/* Article Content Formatting Styles */

/* Main article container */
.post-content {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.8;
    color: var(--color-text);
    font-size: 1.25rem;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* Article title (h1) */
.post-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.8rem;
    line-height: 1.2;
    color: var(--color-text-primary, #205781);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-family: 'Montserrat', sans-serif;
}

/* Section headings (h2) */
.post-content h2,
.article-heading {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    color: var(--color-text-primary, #205781);
    overflow-wrap: break-word;
    letter-spacing: -0.01em;
    position: relative;
    font-family: 'Montserrat', sans-serif;
}

/* Add a subtle accent line to h2 headings */
.post-content h2:after,
.article-heading:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent, #4CAF50);
}

/* Subsection headings (h3) */
.post-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    color: var(--color-text-primary, #205781);
    overflow-wrap: break-word;
    padding-bottom: 0.3rem;
    font-family: 'Montserrat', sans-serif;
}

/* Minor headings (h4) */
.post-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary, #205781);
    overflow-wrap: break-word;
    font-family: 'Montserrat', sans-serif;
}

/* Paragraphs */
.post-content p {
    margin-bottom: 1.5rem;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    font-size: 1.25rem;
    line-height: 1.8;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    position: relative;
}

/* Copy icon for paragraphs */
.copy-icon {
    position: absolute;
    right: 10px;
    top: 0;
    color: var(--color-accent, #4db6e2);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.post-content p:hover .copy-icon {
    opacity: 1;
    display: flex;
}

.copy-icon:hover {
    color: var(--color-accent-dark, #3d99c5);
    background-color: rgba(255, 255, 255, 1);
}

body.dark-theme .copy-icon {
    background-color: rgba(21, 62, 89, 0.8);
    color: var(--color-accent-dark, #5dbfef);
}

body.dark-theme .copy-icon:hover {
    background-color: rgba(21, 62, 89, 1);
}

/* Copy success animation */
.copy-success {
    animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Saved icon pop animation used on Save button feedback */
.saved-pop {
    animation: savedPop 0.3s ease;
}

@keyframes savedPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Lists */
.post-content ul,
.post-content ol,
.article-list {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    max-width: 100%;
    overflow-wrap: break-word;
    font-size: 1.25rem;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

.post-content li,
.article-list li {
    margin-bottom: 0.8rem;
    max-width: 100%;
    overflow-wrap: break-word;
    line-height: 1.6;
    font-size: 1.25rem;
}

/* Blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.2rem;
    font-style: italic;
    margin: 1.5rem 0;
    color: var(--color-text-muted);
    max-width: 100%;
    overflow-wrap: break-word;
    font-size: 1.25rem;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* Code blocks */
.post-content pre {
    background-color: var(--color-bg-secondary);
    padding: 1.2rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    max-width: 100%;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.1rem;
}

.post-content code {
    background-color: var(--color-bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 1.1rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Images */
.post-content img {
    max-width: 70%;
    height: auto !important;
    border-radius: 0.5rem;
    margin: 1.8rem auto;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* Image container */
.post-content figure,
.post-featured-image,
.image-container {
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    text-align: center;
    overflow: hidden;
}

/* Image captions */
.image-caption,
figcaption {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    max-width: 100%;
}

/* Links */
.post-content a,
.article-link {
    color: var(--color-accent, #4CAF50);
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s ease;
    font-weight: 500;
}

.post-content a:hover,
.article-link:hover {
    color: var(--color-accent-dark, #388E3C);
    text-decoration: underline;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    overflow-x: auto;
    display: block;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

.post-content th,
.post-content td {
    border: 1px solid var(--color-border);
    padding: 0.8rem;
    text-align: left;
}

.post-content th {
    background-color: var(--color-bg-secondary);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* Emphasis */
.post-content strong,
.post-content b {
    font-weight: 700;
    color: var(--color-text);
}

.post-content em,
.post-content i {
    font-style: italic;
}

/* FAQ styling */
.faq-question {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-heading);
    background-color: rgba(0,0,0,0.03);
    padding: 0.8rem 1rem;
    border-radius: 0.3rem;
    font-family: 'Montserrat', sans-serif;
}

.faq-answer {
    font-size: 1.25rem;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--color-accent, #4CAF50);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* Add font imports to ensure they're available */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Dark mode adjustments */
body.dark-theme .post-content pre,
body.dark-theme .post-content code {
    background-color: #2d3748;
}

body.dark-theme .post-content th {
    background-color: #2d3748;
}

body.dark-theme .post-title,
body.dark-theme .post-content h2,
body.dark-theme .article-heading,
body.dark-theme .post-content h3,
body.dark-theme .post-content h4,
body.dark-theme .faq-question {
    color: #f7fafc;
}

body.dark-theme .post-content h2:after,
body.dark-theme .article-heading:after {
    background-color: var(--color-accent-dark, #5dbfef);
}

body.dark-theme .faq-question {
    background-color: rgba(255,255,255,0.05);
}

body.dark-theme .post-content img {
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-title {
        font-size: 2.2rem;
    }
    
    .post-content h2,
    .article-heading {
        font-size: 1.8rem;
    }
    
    .post-content h3 {
        font-size: 1.6rem;
    }
    
    .post-content h4 {
        font-size: 1.4rem;
    }
    
    .post-content p,
    .post-content li,
    .article-list,
    .post-content blockquote,
    .faq-answer {
        font-size: 1.15rem;
    }
} 