/* Enhanced Single Article Styles with Improved Readability */

/* Article container */
.single-article-container {
    max-width: 800px; /* Reduced from 900px for better line length */
    margin: 0 auto;
    padding: 0 20px; /* Add padding for mobile devices */
}

/* Article header */
.article-header {
    margin-bottom: 3rem; /* Increased from 2.5rem */
    position: relative;
}

.article-header .entry-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3; /* Increased from 1.2 */
    margin-bottom: 1.5rem;
    color: white;
}

/* Featured image */
.article-featured-image {
    position: relative;
    margin: 2rem 0 3.5rem; /* Increased bottom margin */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

/* Category badges */
.article-categories {
    margin-bottom: 1.5rem; /* Increased from 1rem */
}

.article-category {
    display: inline-block;
    background-color: rgba(78, 158, 255, 0.9);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.article-category:hover {
    background-color: rgba(112, 184, 255, 0.9);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Article meta */
.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem; /* Increased from 2rem */
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.article-author-img {
    width: 54px; /* Increased from 48px */
    height: 54px; /* Increased from 48px */
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
    border: 2px solid rgba(78, 158, 255, 0.5);
}

.article-meta-content span {
    display: block;
}

.article-author-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.article-date-reading {
    margin-left: auto;
    text-align: right;
}

.article-date-reading i {
    margin-right: 0.5rem;
    color: rgba(78, 158, 255, 0.9);
}

/* Article content */
.article-content {
    font-size: 1.15rem; /* Increased from 1.1rem */
    line-height: 1.9; /* Increased from 1.8 */
    color: rgba(255, 255, 255, 0.9);
}

.article-content p {
    margin-bottom: 2rem; /* Increased from 1.5rem */
}

.article-content h2 {
    font-size: 1.9rem; /* Increased from 1.8rem */
    font-weight: 700;
    margin: 3rem 0 1.8rem; /* Increased top margin from 2.5rem and bottom from 1.5rem */
    color: white;
}

.article-content h3 {
    font-size: 1.6rem; /* Increased from 1.5rem */
    font-weight: 700;
    margin: 2.5rem 0 1.5rem; /* Increased top margin from 2rem and bottom from 1.2rem */
    color: white;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 2rem; /* Increased from 1.5rem */
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.8rem; /* Increased from 0.5rem */
}

.article-content blockquote {
    border-left: 4px solid rgba(78, 158, 255, 0.8);
    padding: 1.5rem 0 1.5rem 1.5rem; /* Increased top and bottom padding from 1rem */
    margin: 2.5rem 0; /* Increased from 2rem */
    background-color: rgba(78, 158, 255, 0.05);
    border-radius: 0 8px 8px 0;
}

.article-content blockquote p {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem; /* Add margin between paragraphs in blockquotes */
}

.article-content blockquote p:last-child {
    margin-bottom: 0; /* Remove margin from last paragraph */
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem 0; /* Increased from 1.5rem */
}

.article-content code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.article-content pre {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0; /* Increased from 1.5rem */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Article tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    margin: 4rem 0 3rem; /* Increased top margin from 3rem */
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-tags-title {
    margin-right: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.article-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
}

/* Author box */
.article-author-box {
    background: linear-gradient(145deg, rgba(45, 20, 65, 0.8) 0%, rgba(30, 10, 46, 0.9) 100%);
    border-radius: 16px;
    padding: 2.5rem; /* Increased from 2rem */
    margin: 3.5rem 0; /* Increased from 3rem */
    display: flex;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.author-avatar {
    width: 90px; /* Increased from 80px */
    height: 90px; /* Increased from 80px */
    border-radius: 50%;
    margin-right: 1.8rem; /* Increased from 1.5rem */
    border: 3px solid rgba(78, 158, 255, 0.5);
}

.author-info h4 {
    font-size: 1.4rem; /* Increased from 1.3rem */
    margin-bottom: 0.8rem; /* Increased from 0.5rem */
    color: white;
}

.author-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.8rem; /* Increased from 0.5rem */
    line-height: 1.6; /* Added line-height */
}

.author-social {
    margin-top: 1.2rem; /* Increased from 1rem */
}

.author-social a {
    display: inline-block;
    width: 38px; /* Increased from 36px */
    height: 38px; /* Increased from 36px */
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 38px; /* Match height */
    margin-right: 0.7rem; /* Increased from 0.5rem */
    transition: all 0.3s ease;
}

.author-social a:hover {
    background-color: rgba(78, 158, 255, 0.8);
    color: white;
    transform: translateY(-3px);
}

/* Post navigation */
.post-navigation {
    margin: 4rem 0; /* Increased from 3rem */
    display: flex;
    justify-content: space-between;
}

.post-navigation-link {
    background: linear-gradient(145deg, rgba(45, 20, 65, 0.6) 0%, rgba(30, 10, 46, 0.7) 100%);
    padding: 1.5rem; /* Increased from 1.2rem */
    border-radius: 12px;
    width: 48%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-navigation-link:hover {
    border-color: rgba(78, 158, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-navigation-link span {
    display: block;
}

.post-navigation-label {
    font-size: 0.85rem; /* Increased from 0.8rem */
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem; /* Increased from 0.3rem */
    display: flex;
    align-items: center;
}

.post-navigation-label i {
    margin-right: 0.5rem;
}

.post-navigation-title {
    font-size: 1.1rem; /* Increased from 1rem */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
    line-height: 1.4; /* Added line height */
}

.post-navigation-link:hover .post-navigation-title {
    color: #4e9eff;
}

.post-navigation-next .post-navigation-label {
    justify-content: flex-end;
}

.post-navigation-next .post-navigation-label i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.post-navigation-next {
    text-align: right;
}

/* Related posts */
.related-posts {
    margin: 5rem 0 4rem; /* Increased from 4rem 0 */
}

.related-posts-title {
    font-size: 1.6rem; /* Increased from 1.5rem */
    font-weight: 700;
    margin-bottom: 2.5rem; /* Increased from 2rem */
    position: relative;
    display: inline-block;
}

.related-posts-title:after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, #4e9eff, #a181fc);
    border-radius: 2px;
    margin-top: 0.8rem; /* Increased from 0.5rem */
}

.related-post-card {
    height: 100%;
    background: linear-gradient(145deg, rgba(45, 20, 65, 0.8) 0%, rgba(30, 10, 46, 0.9) 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.related-post-image {
    height: 180px; /* Increased from 160px */
    overflow: hidden;
}

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

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

.related-post-content {
    padding: 1.5rem; /* Increased from 1.2rem */
}

.related-post-title {
    font-size: 1.1rem; /* Increased from 1rem */
    font-weight: 600;
    margin-bottom: 0.7rem; /* Increased from 0.5rem */
    line-height: 1.5; /* Increased from 1.4 */
}

.related-post-title a {
    color: #4e9eff;
    text-decoration: none;
}

.related-post-title a:hover {
    color: #70b8ff;
}

.related-post-date {
    font-size: 0.85rem; /* Increased from 0.8rem */
    color: rgba(255, 255, 255, 0.6);
}

/* Comments section */
.comments-area {
    margin: 5rem 0; /* Increased from 4rem */
    padding-top: 2.5rem; /* Increased from 2rem */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-title {
    font-size: 1.6rem; /* Increased from 1.5rem */
    font-weight: 700;
    margin-bottom: 2.5rem; /* Increased from 2rem */
    position: relative;
    display: inline-block;
}

.comments-title:after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, #4e9eff, #a181fc);
    border-radius: 2px;
    margin-top: 0.8rem; /* Increased from 0.5rem */
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 2.5rem; /* Increased from 2rem */
}

.comment-body {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.8rem; /* Increased from 1.5rem */
    margin-bottom: 1.8rem; /* Increased from 1.5rem */
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem; /* Increased from 1rem */
}

.comment-author {
    display: flex;
    align-items: center;
}

.comment-author .avatar {
    width: 56px; /* Increased from 50px */
    height: 56px; /* Increased from 50px */
    border-radius: 50%;
    margin-right: 1.2rem; /* Increased from 1rem */
    border: 2px solid rgba(78, 158, 255, 0.3);
}

.comment-author .fn {
    font-weight: 600;
    font-style: normal;
    color: rgba(255, 255, 255, 0.9);
}

.comment-metadata {
    margin-left: auto;
    font-size: 0.85rem; /* Increased from 0.8rem */
    color: rgba(255, 255, 255, 0.6);
}

.comment-content {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.2rem; /* Increased from 1rem */
    line-height: 1.7; /* Added line height */
}

.comment-content p {
    margin-bottom: 1rem; /* Add margin between paragraphs */
}

.comment-content p:last-child {
    margin-bottom: 0; /* Remove margin from last paragraph */
}

.comment-reply-link {
    display: inline-block;
    padding: 0.4rem 1rem; /* Increased from 0.3rem 0.8rem */
    background-color: rgba(78, 158, 255, 0.1);
    color: #4e9eff;
    border-radius: 20px;
    font-size: 0.85rem; /* Increased from 0.8rem */
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background-color: rgba(78, 158, 255, 0.2);
    text-decoration: none;
}

.children {
    list-style: none;
    padding-left: 3.5rem; /* Increased from 3rem */
}

/* Comment form */
.comment-respond {
    background: linear-gradient(145deg, rgba(45, 20, 65, 0.8) 0%, rgba(30, 10, 46, 0.9) 100%);
    border-radius: 16px;
    padding: 2.5rem; /* Increased from 2rem */
    margin: 3.5rem 0; /* Increased from 3rem */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.comment-reply-title {
    font-size: 1.4rem; /* Increased from 1.3rem */
    font-weight: 700;
    margin-bottom: 1.8rem; /* Increased from 1.5rem */
    color: white;
}

.comment-form-comment label {
    display: block;
    margin-bottom: 0.7rem; /* Increased from 0.5rem */
    color: rgba(255, 255, 255, 0.8);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 1rem 1.2rem; /* Increased from 0.8rem 1rem */
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    margin-bottom: 1.2rem; /* Increased from 1rem */
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem; /* Added font-size */
}

.comment-form textarea:focus,
.comment-form input:focus {
    outline: none;
    border-color: rgba(78, 158, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(78, 158, 255, 0.2);
}

.comment-form textarea {
    min-height: 180px; /* Increased from 150px */
    line-height: 1.6; /* Added line-height */
}

.comment-form .submit {
    background-color: #4e9eff;
    color: white;
    border: none;
    padding: 0.9rem 1.8rem; /* Increased from 0.8rem 1.5rem */
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem; /* Added font-size */
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form .submit:hover {
    background-color: #3b8aeb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 158, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .single-article-container {
        padding: 0 15px;
    }

    .article-header .entry-title {
        font-size: 2rem; /* Reduced from 2.2rem */
        line-height: 1.3;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-date-reading {
        margin-left: 0;
        margin-top: 1rem;
        text-align: left;
    }
    
    .article-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 1.5rem; /* Adjusted padding */
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .article-content {
        font-size: 1.05rem; /* Adjusted for mobile */
    }
    
    .post-navigation-link {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .post-navigation {
        flex-direction: column;
    }

    .comment-respond {
        padding: 1.8rem;
    }
}

/* Dark mode adjustments for better readability */
@media (prefers-color-scheme: dark) {
    .article-content {
        color: rgba(255, 255, 255, 0.95); /* Slightly brighter text in dark mode */
    }
    
    .article-content h2,
    .article-content h3 {
        color: white;
    }
    
    .article-content blockquote {
        background-color: rgba(78, 158, 255, 0.08); /* Slightly more visible in dark mode */
    }
}

/* Added styles for better content hierarchy */
.article-content h2 + p,
.article-content h3 + p {
    margin-top: -0.5rem; /* Bring first paragraph after heading slightly closer */
}

/* Make sure images don't overflow their container */
.article-content img {
    max-width: 100%;
    height: auto;
}

/* Better spacing for lists */
.article-content ul li,
.article-content ol li {
    margin-bottom: 0.8rem;
}

.article-content ul li:last-child,
.article-content ol li:last-child {
    margin-bottom: 0;
}

/* Add a subtle highlight for code */
.article-content code {
    color: #ffa07a; /* Light salmon for better visibility */
}

/* Improve table readability if present */
.article-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content table th {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
}

.article-content table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Article intro paragraph styling */
.article-content > p:first-child {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 1);
    margin-bottom: 2.5rem;
}

/* Highlight text selection */
.article-content ::selection {
    background: rgba(78, 158, 255, 0.3);
    color: white;
}