/**
 * Blog Improvements CSS
 * Estilos mejorados para el blog y la barra lateral
 */

/* Barra de progreso de lectura */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, #002674, #0073aa);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Mejoras para el artículo individual */
.blog-single-post {
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.blog-single-post .post-header {
    margin-bottom: 2rem;
}

.blog-single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.blog-single-post .post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-single-post .post-meta-item i {
    color: #002674;
}

.blog-single-post .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 6px;
}

.blog-single-post .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.blog-single-post .post-content p {
    margin-bottom: 1.5rem;
}

.blog-single-post .post-content h2,
.blog-single-post .post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #002674;
}

.blog-single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.blog-single-post .post-content blockquote {
    border-left: 4px solid #002674;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #f8f9fa;
    font-style: italic;
}

.blog-single-post .post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.blog-single-post .post-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin: 0.3rem;
    background-color: #f0f2f5;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-single-post .post-tag:hover {
    background-color: #002674;
    color: #fff;
}

/* Mejoras para la barra lateral */
.blog-sidebar {
    margin-top: 0;
}

.sidebar-widget {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f2f5;
    color: #002674;
    position: relative;
}

.widget-title:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #002674;
}

/* Mejoras para los posts recientes en la barra lateral */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-post-item {
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-link {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.recent-post-thumbnail {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recent-post-link:hover .recent-post-thumbnail img {
    transform: scale(1.05);
}

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    transition: color 0.2s;
}

.recent-post-link:hover .recent-post-title {
    color: #002674;
}

.recent-post-meta {
    font-size: 0.8rem;
    color: #666;
}

.recent-post-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.recent-post-date i {
    color: #002674;
}

/* Mejoras para los posts relacionados */
.related-posts-section {
    padding: 3rem 0;
    background-color: #f8f9fa;
    margin-top: 2rem;
}

.related-post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-post-card .post-thumbnail {
    position: relative;
}

.related-post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
    min-height: 100%;
    object-fit: cover;
}

.related-post-card .post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: #002674;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.related-post-card .post-category:hover {
    background-color: #001a4d;
}

.related-post-card .post-content {
    padding: 1.5rem;
}

.related-post-card .post-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.related-post-card .post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.related-post-card .post-title a:hover {
    color: #002674;
}

.related-post-card .post-meta {
    font-size: 0.8rem;
    color: #666;
}

/* Estilos para las cards de posts recientes en el sidebar */
.sidebar-recent-posts-cards .recent-posts-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-recent-posts-cards .post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.sidebar-recent-posts-cards .post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-recent-posts-cards .post-thumbnail {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.sidebar-recent-posts-cards .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sidebar-recent-posts-cards .post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.sidebar-recent-posts-cards .post-category {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background-color: #002674;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.sidebar-recent-posts-cards .post-category:hover {
    background-color: #001a4d;
}

.sidebar-recent-posts-cards .post-content {
    padding: 1rem;
}

.sidebar-recent-posts-cards .post-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.sidebar-recent-posts-cards .post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-recent-posts-cards .post-title a:hover {
    color: #002674;
}

.sidebar-recent-posts-cards .post-meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
}

.sidebar-recent-posts-cards .post-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sidebar-recent-posts-cards .post-date i {
    color: #002674;
}

/* Responsive */
@media (max-width: 991px) {
    .blog-sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .blog-single-post {
        padding: 1.5rem;
    }
    
    .related-post-card .post-thumbnail {
        height: 180px;
    }
    
    .sidebar-recent-posts-cards .post-thumbnail {
        height: 140px;
    }
}
