/* Blog Styles */
.blog-container {
    color: #DDE6ED;
    padding-bottom: 0rem;
    max-width: 1140px; /* More controlled width for content */
    margin: 0 auto;
    text-align: left; /* Ensure all content is left-aligned */
}

.blog-header {
    margin-bottom: 2rem;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-posts-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-meta {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-author {
    font-weight: 600;
    color: #DDE6ED;
}

.blog-date {
    font-style: italic;
}

/* TLDR Section */
.blog-tldr {
    background-color: rgba(73, 79, 87, 0.15);
    border-left: 4px solid #494f57;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.25rem;
    position: relative;
}

.blog-tldr h4 {
    color: #aaaaaa;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.blog-tldr p {
    margin-bottom: 0;
    font-size: 1.05rem;
}

/* Styled TL;DR section with auto-generated label */
.blog-tldr::before {
    content: 'TL;DR';
    position: absolute;
    top: -12px;
    left: 15px;
    background-color: #494f57;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Social Share Buttons - Updated for X instead of Twitter */
.social-share-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.x-button {
    background-color: #000;
    color: #fff !important;
    border: 1px solid #333;
}

.x-button:hover {
    background-color: #333;
    border-color: #444;
}

.linkedin-button {
    background-color: #0077b5;
    color: #fff !important;
    border: 1px solid #0077b5;
}

.linkedin-button:hover {
    background-color: #0369a0;
    border-color: #0369a0;
}

.blog-tags .badge {
    margin-right: 0.5rem;
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.7;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.blog-content h1 {
    font-size: 2.25rem;
}

.blog-content h2 {
    font-size: 1.8rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content h4 {
    font-size: 1.25rem;
}

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

.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: block;
    max-height: 600px; /* Limit maximum height */
    object-fit: contain; /* Keep aspect ratio without stretching */
}

.blog-content pre {
    background-color: #1e1e1e; /* Darker background */
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1.8rem 0;
    overflow-x: auto;
    border: 1px solid rgba(100, 100, 100, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 100%;
}

.blog-content code {
    font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    letter-spacing: -0.025em;
}

.blog-content p code {
    background-color: rgba(255, 255, 255, 0.12);
    color: #e9e9e9;
    font-weight: 500;
    border: 1px solid rgba(100, 100, 100, 0.2);
}

.blog-content blockquote {
    border-left: 4px solid #4d4d4d;
    padding-left: 1rem;
    font-style: italic;
    margin: 1.5rem 0;
    color: #aaa;
}

.blog-content ul,
.blog-content ol {
    margin: 1.5rem 0 1.5rem 1rem;
    padding-left: 1rem;
}

.blog-content ul li,
.blog-content ol li {
    margin-bottom: 0.5rem;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.blog-content table th,
.blog-content table td {
    padding: 0.75rem;
    border: 1px solid #4d4d4d;
}

/* Dynamic Copyright Footer */
footer {
    margin-top: 3rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .rights {
    font-size: 1rem !important;
    color: #aaa;
    padding: 1rem 0 !important;
}

.custom-footer {
    margin-top: 3rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.custom-footer .footer-content {
    font-size: 1rem;
    color: #aaa;
}

.blog-content table th {
    background-color: rgba(255, 255, 255, 0.1);
    text-align: left;
    font-weight: 600;
}

.blog-content hr {
    border: 0;
    height: 1px;
    background-color: #4d4d4d;
    margin: 2rem 0;
}

.blog-content a {
    color: #61dafb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-content a:hover {
    color: #4ea8ff;
    text-decoration: underline;
}

.blog-footer {
    color: #ddd;
    font-size: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
}

.blog-share {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Markdown Editor Styles */
.editor-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    margin-top: 2rem;
}

.editor-row {
    display: flex;
    flex: 1;
    gap: 20px;
}

.editor-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: bold;
    color: #DDE6ED;
}

.markdown-textarea {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    color: #DDE6ED;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    padding: 1rem;
    resize: none;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.preview-area {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    color: #DDE6ED;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    padding: 1rem;
    overflow: auto;
}

.editor-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
}

.editor-actions .btn {
    flex: 1;
}

.html-output {
    width: 100%;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.03);
    color: #DDE6ED;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    resize: none;
    margin-top: 1rem;
}

.metadata-section {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.metadata-section h4 {
    margin-bottom: 1rem;
}

.metadata-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .metadata-fields {
        grid-template-columns: 1fr;
    }
    
    .blog-content img {
        max-height: 400px; /* Smaller max height on mobile */
        margin: 1.5rem auto;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-content h1 {
        font-size: 1.8rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .editor-row {
        flex-direction: column;
    }
}

/* Custom footer styles */
footer.custom-footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  background-color: #000;
  text-align: center;
  position: relative;
  width: 80vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  z-index: 0;
}

footer .footer-content {
  color: #e0e0e0;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 0;
}