/* Detail page specific styles */
.article-container {
    max-width: 1200px;
    margin: 40px auto;
    /*padding: 0 15px;*/
    display: flex;
    gap: 30px;
}

.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.article-author {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.article-date {
    margin-right: 15px;
}

.article-category {
    display: inline-block;
    padding: 4px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
}

.article-featured-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0 0 30px;
}

.article-content {
    flex: 1;
    min-width: 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    background: #fff;
    /*padding: 30px;*/
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 30px 0 15px;
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 25px 0 15px;
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    /*border-radius: 4px;*/
    margin: 20px 0;
}

.article-content blockquote {
    border-left: 4px solid #4a90e2;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 0;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    margin-right: 8px;
    margin-bottom: 8px;
}

.article-share {
    margin-bottom: 30px;
}

.share-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.share-button:hover {
    background-color: #e0e0e0;
}

.related-articles {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.related-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-item {
    position: relative;
    cursor: pointer;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-2px);
}

.related-item-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.related-item-img {
    width: 100%;
    height: 0;
    padding-bottom: 52.5%; /* 600/315 = 0.525 */
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

.related-item-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-item-img img {
    transform: scale(1.05);
}

.related-item-content {
    padding: 15px;
}

.related-item-title {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #333;
}

.related-item-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.related-item-meta {
    font-size: 13px;
    color: #999;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .article-container {
        flex-direction: column;
    }

    .related-articles {
        width: 100%;
        margin-top: 30px;
    }

    .related-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .article-container {
        margin: 20px auto;
    }

    .article-content {
        padding: 20px 0px;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .article-meta {
        flex-wrap: wrap;
    }

    .related-articles {
        padding: 15px;
    }
}

/* Comments section */
.comments-section {
    margin-top: 50px;
}

.comments-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 15px;
}

.comment-list {
    margin-top: 30px;
}

.comment-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.comment-author {
    font-weight: bold;
    margin-right: 10px;
}

.comment-date {
    color: #888;
    font-size: 0.9rem;
}

.comment-content {
    line-height: 1.6;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .article-container {
        flex-direction: column;
        /*padding: 15px;*/
    }

    .article-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.2rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}
