/* Encabezado del Blog */
.blog-header {
    background: linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 153, 204, 0.7)), url('../resources/blog/blog-header.jpg') center/cover;
    padding: 100px 0 40px;
    color: white;
    text-align: center;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-subtitle {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.9;
}

/* Layout principal */
.blog-main {
    padding: 50px 0;
    background-color: #ffffff;
    min-height: 60vh;
}

.blog-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Área de artículos */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.loading {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 40px 0;
}

.loading i {
    margin-right: 10px;
}

/* Tarjetas de artículos */
.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-card-content {
    padding: 25px;
}

.blog-card-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    line-height: 1.3;
}

.blog-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.blog-card-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.read-more:hover {
    color: var(--accent-color);
}

.read-more:hover i {
    transform: translateX(3px);
}

/* Barra lateral */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.categories-list, .archive-list {
    list-style: none;
    padding: 0;
}

.categories-list li, .archive-list li {
    margin-bottom: 10px;
}

.categories-list a, .archive-list a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
}

.categories-list a:hover, .archive-list a:hover {
    color: var(--primary-color);
}

.categories-list a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Newsletter */
.newsletter-widget {
    background: var(--secondary-color);
    color: white;
}

.newsletter-widget h3 {
    color: white;
    border-bottom-color: var(--primary-color);
}

.newsletter-widget p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-subscribe {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-subscribe:hover {
    background: var(--accent-color);
}

/* Modal de artículo completo */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 10px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary-color);
}

/* Estilos del artículo completo */
#full-article h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

#full-article .article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    color: #666;
    font-size: 1rem;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

#full-article .article-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

#full-article p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.1rem;
}

#full-article h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--primary-color);
}

#full-article h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--secondary-color);
}

#full-article ul, #full-article ol {
    margin: 20px 0 20px 30px;
}

#full-article li {
    margin-bottom: 10px;
    line-height: 1.6;
}

#full-article blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
    padding-left: 20px;
    color: #666;
    font-style: italic;
}

#full-article pre {
    background: #f5f8fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

#full-article code {
    background: #f5f8fa;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

#full-article img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-content {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: relative;
        top: 0;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 90px 0 30px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-card-title {
        font-size: 1.5rem;
    }
    
    .blog-card-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    #full-article h1 {
        font-size: 2rem;
    }
}

/* Sin resultados */
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.no-results h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* Categorías en tarjetas */
.blog-card-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Botones de compartir */
.share-buttons {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.share-buttons h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.share-button {
    display: inline-block;
    margin-right: 10px;
    padding: 8px 15px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button.facebook { background: #3b5998; }
.share-button.twitter { background: #1da1f2; }
.share-button.linkedin { background: #0077b5; }
.share-button.whatsapp { background: #25d366; }