/**
 * VilaTec 2.0 — CSS: Página de Detalle de Artículo (Blog)
 * Estética premium oscura con tipografía fluida y excelente legibilidad.
 */

/* Contenedor principal de la página */
#blog-post-page {
    background-color: #05070a;
    color: #cbd5e1;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding-bottom: 6rem;
}

/* ─── POST HERO ────────────────────────────────────────── */
.post-hero {
    position: relative;
    padding: 8rem 0 2rem 0;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: #090d16;
}

/* Imagen de fondo desenfocada */
.post-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.3);
    transform: scale(1.1);
    opacity: 0.55;
    z-index: 1;
}

/* Capa de degradado */
.post-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 7, 10, 0.2) 0%, rgba(5, 7, 10, 0.95) 100%);
    z-index: 2;
}

.post-hero__container {
    position: relative;
    z-index: 3;
    width: 100%;
}

.post-hero__content {
    max-width: 900px;
}

.post-hero__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-hero__badge {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-hero__date {
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.post-hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    font-family: 'Outfit', 'Inter', sans-serif;
}

/* ─── GRID DE CONTENIDO ─────────────────────────────────── */
.post-layout {
    padding-top: 1.5rem;
    padding-bottom: 6rem;
    position: relative;
    z-index: 10;
}

.post-layout__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .post-layout__grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

/* Imagen destacada en primer plano */
.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    margin-bottom: 3.5rem;
}

/* Cuerpo del artículo */
.post-body {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #cbd5e1;
    max-width: 760px; /* Ancho optimizado para la lectura */
}

/* Tipografía de lectura dentro del artículo */
.post-body p {
    margin-bottom: 1.75rem;
}

.post-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.01em;
}

.post-body h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.post-body ul, .post-body ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.65rem;
}

.post-body li::marker {
    color: var(--color-primary);
}

.post-body strong {
    color: #ffffff;
    font-weight: 600;
}

.post-body blockquote {
    border-left: 4px solid var(--color-primary, #007bff);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem 2rem;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: #e2e8f0;
    margin: 2.5rem 0;
}

.post-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Imagen dentro de contenido */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── SIDEBAR / MÁS LEÍDOS ────────────────────────────── */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.post-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
}

.post-widget__title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    font-family: 'Outfit', sans-serif;
}

/* Lista de posts recomendados */
.rec-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rec-post-card {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    group: hover;
}

.rec-post-card__img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    background-color: #090d16;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rec-post-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rec-post-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-post-card:hover .rec-post-card__title {
    color: #60a5fa;
}

.rec-post-card__date {
    font-size: 0.75rem;
    color: #64748b;
}

/* ─── BANNER CTA LECTURA ───────────────────────────────── */
.post-cta-banner {
    margin-top: 5rem;
    background: radial-gradient(circle at top right, rgba(0, 123, 255, 0.15) 0%, rgba(5, 7, 10, 0.3) 60%), #090d16;
    border: 1px solid rgba(0, 123, 255, 0.25);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.post-cta-banner__glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: #007bff;
    filter: blur(80px);
    opacity: 0.12;
    pointer-events: none;
}

.post-cta-banner__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.post-cta-banner__desc {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 550px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

.post-cta-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Botón de volver al listado / inicio */
.post-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    transition: color 0.2s ease;
}

.post-back-btn:hover {
    color: #ffffff;
}

/* Responsivo */
@media (max-width: 768px) {
    .post-hero {
        padding-top: 8rem;
        min-height: 350px;
    }
    
    .post-featured-image {
        border-radius: 16px;
        margin-bottom: 2.5rem;
    }
    
    .post-body {
        font-size: 1rem;
        line-height: 1.75;
    }
    
    .post-cta-banner {
        padding: 2rem 1.5rem;
    }
}
