/* =====================================================
   SISTEMA DE BLOG - ESTILOS
   ===================================================== */

/* Container Principal */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header del Blog */
.blog-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.blog-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.category-header, .tag-header {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    font-size: 42px;
    margin-bottom: 10px;
}

.category-header i, .tag-header i {
    color: var(--primary-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    margin-top: 15px;
}

.back-link:hover {
    text-decoration: underline;
}

/* Layout con Sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* Grid de Artículos */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Card de Artículo */
.article-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.25);
    border-color: var(--accent-primary);
}

.article-image {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
    align-self: flex-start;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-meta i {
    font-size: 12px;
}

.article-description {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.article-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.2s ease;
}

.article-link:hover {
    gap: 12px;
}

/* Vista Individual del Artículo */
.blog-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs i {
    font-size: 10px;
    color: var(--border-color);
}

/* Header del Artículo */
.article-header {
    margin-bottom: 40px;
}

.article-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
}
.article-category-badge:hover {
    color:#FFF;
}

.article-h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--text-color);
}

.meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--primary-color);
}

/* Botones de Compartir */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color:#FFF;
}

.share-btn.facebook { background-color: #1877f2; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.linkedin { background-color: #0a66c2; }
.share-btn.whatsapp { background-color: #25d366; }
.share-btn.copy { background-color: #6c757d; border: none; cursor: pointer; }

/* Imagen Destacada */
.article-featured-image {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contenido del Artículo */
.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.article-body h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text-color);
}

.article-body h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text-color);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

.article-body code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.article-body pre {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #666;
}

/* Tags del Artículo */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 25px 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tags-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--gradient-secondary);
    color: white !important;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.4);
}

.tag-item.active {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
}

/* Compartir al Final */
.article-share-footer {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
}

.article-share-footer p {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-color);
}

.share-buttons-large {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.share-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn-large.facebook { background-color: #1877f2; }
.share-btn-large.twitter { background-color: #1da1f2; }
.share-btn-large.linkedin { background-color: #0a66c2; }
.share-btn-large.whatsapp { background-color: #25d366; }

/* Artículos Relacionados */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.2);
    border-color: var(--accent-primary);
}

.related-image {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    padding: 20px;
}

.related-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.related-title a {
    color: var(--text-color);
    text-decoration: none;
}

.related-title a:hover {
    color: var(--primary-color);
}

.related-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list li.active a {
    color: var(--primary-color);
    font-weight: 600;
}

.categories-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.categories-list a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.categories-list i {
    color: var(--primary-color);
    font-size: 14px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination-pages {
    display: flex;
    gap: 5px;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pagination-link.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    font-weight: 700;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-muted);
}

/* Notificación de Copiar Link */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Estado Vacío */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 80px;
    color: var(--border-color);
    margin-bottom: 25px;
}

.empty-state p {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .article-h1 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 36px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .share-buttons-large {
        flex-direction: column;
    }
    
    .share-btn-large {
        width: 100%;
        justify-content: center;
    }
}

