/* 
 * Blog Post Styles 
 * A clean, modern design for tech blog posts
 */

/* Base Styles */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f9f9f9;
    --border-color: #eaeaea;
    --success-color: #00b894;
    --error-color: #d63031;
    --warning-color: #fdcb6e;
    --info-color: #0984e3;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-code: 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-color);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1.5rem;
}

strong {
    font-weight: 700;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: var(--bg-light);
    font-style: italic;
}

blockquote p {
    margin-bottom: 0.5rem;
}

blockquote cite {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: normal;
    display: block;
}

code {
    font-family: var(--font-code);
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

pre {
    background: #282c34;
    color: #abb2bf;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.code-block {
    margin: 2rem 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
    width: 100%;
}

.col-8 {
    width: 66.666667%;
}

.col-4 {
    width: 33.333333%;
}

/* Header */
.site-header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo a {
    color: var(--text-color);
}

.navbar-links {
    display: flex;
    list-style: none;
}

.navbar-links li {
    margin-left: 1.5rem;
}

.navbar-links a {
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Blog Content */
.blog-container {
    padding: 3rem 0;
}

.error-container, .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.error-icon, .loading-spinner {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--error-color);
}

.loading-spinner {
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blog-content {
    margin-bottom: 3rem;
}

.blog-header {
    margin-bottom: 2rem;
}

.blog-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
}

.blog-meta i {
    margin-right: 0.5rem;
}

.featured-image {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-article {
    margin-bottom: 3rem;
}

.image-container {
    margin: 2rem 0;
    text-align: center;
}

.image-container img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

/* Author Section */
.author-box {
    display: flex;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 3rem;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.author-info h4 {
    margin-bottom: 0.25rem;
}

.author-role {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.author-bio {
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
}

.author-social a {
    margin-right: 1rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.author-social a:hover {
    color: var(--primary-color);
}

/* Comments */
.comments-section {
    margin-bottom: 3rem;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.comments-title {
    font-size: 1.5rem;
}

.comment {
    display: flex;
    margin-bottom: 2rem;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.comment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.comment-body p {
    margin-bottom: 1rem;
}

.comment-actions button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

.comment-actions button:hover {
    color: var(--secondary-color);
}

.comment-replies {
    margin-left: 4rem;
}

.comment.reply {
    margin-bottom: 1.5rem;
}

.comment.reply .comment-avatar {
    width: 50px;
    height: 50px;
}

/* Comment Form */
.comment-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
}

.comment-form-title {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-row {
    display: flex;
    margin: 0 -10px;
}

.form-col {
    padding: 0 10px;
    flex: 1;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    margin-bottom: 2.5rem;
}

.sidebar-widget-title {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.sidebar-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.related-post {
    display: flex;
    margin-bottom: 1.5rem;
}

.related-post:last-child {
    margin-bottom: 0;
}

.related-post-image {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.related-post-category {
    display: block;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.related-post-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.related-post-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.newsletter-form button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Tags */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-light);
    border-radius: 3px;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Footer */
.site-footer {
    background-color: #2d3436;
    color: #dfe6e9;
    padding: 4rem 0 2rem;
}

.footer-widgets {
    margin-bottom: 3rem;
}

.footer-widget {
    margin-bottom: 2rem;
}

.footer-widget-title {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-text {
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: background-color 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #dfe6e9;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: none;
}

.message.success {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.message.error {
    background-color: rgba(214, 48, 49, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(214, 48, 49, 0.2);
}

.message.info {
    background-color: rgba(9, 132, 227, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(9, 132, 227, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .col-8, .col-4 {
        width: 100%;
    }
    
    .sidebar {
        margin-top: 3rem;
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        display: flex;
    }
    
    .navbar-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .navbar-links.active {
        display: block;
    }
    
    .navbar-links li {
        margin: 0;
        padding: 0.75rem 2rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        margin-bottom: 1.5rem;
    }
    
    .form-col:last-child {
        margin-bottom: 0;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin: 0 auto 1.5rem;
    }
    
    .author-social {
        justify-content: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
}

@media (max-width: 576px) {
    .blog-header {
        text-align: center;
    }
    
    .blog-meta {
        justify-content: center;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin: 0 auto 1rem;
    }
    
    .comment-header {
        flex-direction: column;
        text-align: center;
    }
    
    .comment-author {
        margin-bottom: 0.5rem;
    }
    
    .comment-replies {
        margin-left: 1rem;
    }
} 