/* ===== ESTILOS PARA BLOG ===== */

/* ARCHIVE BLOG */
.blog-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.blog-archive-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-archive-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 3px solid #800000;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.blog-archive-description {
    max-width: 600px;
    margin: 1rem auto;
    color: #666;
    line-height: 1.6;
}

.blog-archive-count {
    max-width: 600px;
    margin: 1rem auto;
    color: #666;
}

/* BUSCADOR BLOG - ACTUALIZADO CON COLOR ROJO */
.blog-search-form-main {
    max-width: 500px;
    margin: 2rem auto 0;
}

.blog-search-container-main {
    display: flex;
}

.blog-search-input-main {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
    font-size: 1rem;
    outline: none;
}

.blog-search-input-main:focus {
    border-color: #800000;
}

.blog-search-button-main {
    background: #800000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.blog-search-button-main:hover {
    background: #600000;
}

/* LAYOUT BLOG */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* GRID DE POSTS */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.blog-post-card {
    background: rgba(128, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(128, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* IMAGEN DEL POST */
.post-image {
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-image a {
    display: block;
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-image-placeholder {
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #800000 0%, #a00000 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.post-image-placeholder span {
    font-size: 2rem;
}

/* CONTENIDO DEL POST */
.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.post-title {
    margin: 0 0 0.8rem 0;
    font-size: 1.2rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.post-title a {
    color: #112B00;
    text-decoration: none;
}

.post-excerpt {
    color: #333;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    flex: 1;
}

/* CATEGORÍAS Y BOTÓN DEL POST */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-category {
    background: rgba(128, 0, 0, 0.1);
    color: #800000;
    padding: 3px 6px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.75rem;
    border: 1px solid rgba(128, 0, 0, 0.2);
}

.post-category:hover {
    background: rgba(128, 0, 0, 0.2);
    color: #800000;
}

.post-button {
    background: #800000;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    transition: background 0.3s;
    white-space: nowrap;
}

.post-button:hover {
    background: #600000;
    color: white;
}

/* SIDEBAR BLOG */
.blog-sidebar {
    background: rgba(128, 0, 0, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(128, 0, 0, 0.1);
}

.blog-sidebar-section {
    margin-bottom: 2rem;
}

.blog-sidebar-title {
    color: #112B00;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-sidebar-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

/* CATEGORÍAS SIDEBAR */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-link {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    transition: color 0.3s;
}

.category-link:hover {
    color: #800000;
}

.category-count {
    background: rgba(128, 0, 0, 0.1);
    color: #800000;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* POSTS RECIENTES SIDEBAR */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(17, 43, 0, 0.1);
}

.recent-post-link {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
    display: block;
    transition: color 0.3s;
}

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

/* ESTADO VACÍO BLOG */
.blog-empty {
    text-align: center;
    padding: 4rem;
    background: rgba(128, 0, 0, 0.05);
    border-radius: 8px;
    grid-column: 1 / -1;
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.blog-empty-title {
    color: #666;
    margin-bottom: 1rem;
}

.blog-empty-description {
    color: #888;
    margin-bottom: 1.5rem;
}

.blog-empty-button {
    display: inline-block;
    background: #800000;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.blog-empty-button:hover {
    background: #600000;
    color: white;
}

/* PAGINACIÓN BLOG */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* SINGLE POST */
.single-post-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

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

.post-single-categories {
    margin-bottom: 1rem;
}

.post-single-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.post-single-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.post-single-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

/* ESTILOS PARA EL CONTENIDO DEL POST */
.post-single-content h2 {
    color: #112B00;
    margin: 2rem 0 1rem 0;
    border-left: 4px solid #800000;
    padding-left: 1rem;
}

.post-single-content h3 {
    color: #333;
    margin: 1.5rem 0 1rem 0;
}

.post-single-content blockquote {
    border-left: 4px solid #800000;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    background: rgba(128, 0, 0, 0.03);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

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

.post-single-tags strong {
    color: #112B00;
}

.post-tag {
    background: rgba(17, 43, 0, 0.1);
    color: #112B00;
    padding: 4px 8px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(17, 43, 0, 0.2);
}

/* ===== RESPONSIVE BLOG ===== */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-archive-wrapper {
        padding: 1rem !important;
    }

    .posts-grid {
        gap: 1.5rem !important;
    }

    .blog-post-card {
        padding: 1.2rem !important;
    }

    .blog-sidebar {
        padding: 1rem !important;
        order: 2;
    }

    .blog-posts-main {
        order: 1;
    }

    .blog-archive-title {
        font-size: 2rem !important;
    }

    .post-single-title {
        font-size: 2rem !important;
    }

    .single-post-wrapper {
        padding: 1rem !important;
    }

    .post-single-content {
        font-size: 1rem !important;
        padding: 1.5rem !important;
    }
}

@media (min-width: 1025px) and (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}