/* Estilos específicos para páginas de artículos del blog */

/* Estructura del artículo */
.blog-post {
    padding: 2rem 0 4rem;
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.post-category {
    background-color: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.post-excerpt {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 800px;
    margin: 1rem auto;
    line-height: 1.6;
}

.post-featured-image {
    margin-bottom: 2.5rem;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-caption {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Contenido del artículo */
.post-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-content h2 {
    margin: 2.5rem 0 1rem;
    color: var(--color-primary-dark);
    font-size: 1.8rem;
}

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

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

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--color-primary-dark);
}

.post-image-container {
    margin: 2rem 0;
    text-align: center;
}

.post-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Pie del artículo */
.post-footer {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.post-tags {
    margin-bottom: 1.5rem;
}

.post-tags span {
    font-weight: 600;
    margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    background-color: var(--color-accent-alt);
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0.25rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: var(--color-accent);
    color: white;
}

.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-buttons span {
    font-weight: 600;
    margin-right: 0.5rem;
}

.share-buttons a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-secondary);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.share-buttons a:hover {
    background-color: var(--color-secondary-dark);
}

/* Caja del autor */
.author-box {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background-color: var(--color-accent-alt);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.author-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
}

.author-bio {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.author-social a {
    display: inline-block;
    margin-right: 1rem;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.author-social a:hover {
    text-decoration: underline;
}

/* Sección de comentarios */
.comments-section {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.comments-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.comments-container {
    margin-bottom: 2.5rem;
}

.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.comment-author {
    margin: 0;
    font-size: 1.1rem;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.comment-body {
    line-height: 1.6;
    font-size: 0.95rem;
}

.comment-actions {
    margin-top: 0.75rem;
}

.reply-button {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.reply-button:hover {
    text-decoration: underline;
}

.comment-replies {
    margin-top: 1.5rem;
    margin-left: 2.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-accent-alt);
}

.comment.reply {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.comment.reply:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Formulario de comentarios */
.comment-form-container {
    background-color: var(--color-bg-alt);
    padding: 2rem;
    border-radius: 8px;
}

.comment-form-container h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
}

.comment-form .form-group {
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.comment-form textarea {
    resize: vertical;
}

.comment-form .checkbox-group {
    display: flex;
    align-items: flex-start;
}

.comment-form .checkbox-group input {
    margin-top: 0.25rem;
    margin-right: 0.5rem;
}

.comment-form .required {
    color: #e74c3c;
}

.comment-form .btn-primary {
    padding: 0.75rem 2rem;
}

/* Artículos relacionados */
.related-posts {
    max-width: 800px;
    margin: 0 auto;
}

.related-posts h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.related-post-card {
    display: block;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.related-post-card:hover {
    transform: translateY(-5px);
}

.related-post-card .post-image {
    height: 150px;
    overflow: hidden;
}

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

.related-post-card:hover .post-image img {
    transform: scale(1.05);
}

.related-post-card .post-content {
    padding: 1.25rem;
    margin: 0;
}

.related-post-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: var(--color-primary-dark);
}

.related-post-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-excerpt {
        font-size: 1.1rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .author-avatar {
        margin-bottom: 1rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .post-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .post-excerpt {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .comment-replies {
        margin-left: 1rem;
        padding-left: 1rem;
    }
    
    .comment-form-container {
        padding: 1.5rem;
    }
}