/* ==========================================================================
   Page Content Styles - Modern & Responsive
   ========================================================================== */

/* Main Container */
#primary.site-main,
.site-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 160px 30px 80px;
    /* Increased top padding for header clearance */
    background: #fff;
    min-height: 50vh;
}

/* Article Wrapper - Multiple selectors for compatibility */
article,
.hentry,
.type-page,
.type-post {
    padding: 0;
}

/* Page Header */
.entry-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

/* Entry Content - Main Styles */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #444;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #1a1a1a;
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 600;
    line-height: 1.4;
}

.entry-content h1 {
    font-size: 2rem;
}

.entry-content h2 {
    font-size: 1.6rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color, #4169e1);
    display: inline-block;
}

.entry-content h3 {
    font-size: 1.35rem;
}

.entry-content h4 {
    font-size: 1.15rem;
}

.entry-content h5 {
    font-size: 1rem;
}

.entry-content h6 {
    font-size: 0.9rem;
}

/* Paragraphs */
.entry-content p {
    margin-bottom: 1.5em;
}

/* Links */
.entry-content a {
    color: var(--primary-color, #4169e1);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.entry-content a:hover {
    border-bottom-color: var(--primary-color, #4169e1);
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
    padding-left: 0.5em;
}

.entry-content ul li::marker {
    color: var(--primary-color, #4169e1);
}

/* Blockquotes */
.entry-content blockquote {
    margin: 2em 0;
    padding: 20px 30px;
    border-left: 4px solid var(--primary-color, #4169e1);
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.entry-content code {
    background: #f1f1f1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #c7254e;
}

.entry-content pre {
    background: #1a1a1a;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}

.entry-content th,
.entry-content td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.entry-content th {
    background: var(--primary-color, #4169e1);
    color: #fff;
    font-weight: 600;
}

.entry-content tr:nth-child(even) {
    background: #f8f9fa;
}

/* Images */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.entry-content figure {
    margin: 2em 0;
}

.entry-content figcaption {
    text-align: center;
    font-size: 0.9em;
    color: #888;
    margin-top: 10px;
}

/* Horizontal Rule */
.entry-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 3em 0;
}

/* Entry Footer (Edit Link) */
.entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.edit-link a {
    color: #888;
    font-size: 0.9em;
    text-decoration: none;
}

.edit-link a:hover {
    color: var(--primary-color, #4169e1);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {

    #primary.site-main,
    .site-main {
        padding: 40px 20px 60px;
    }

    .entry-title {
        font-size: 1.8rem;
    }

    .entry-content {
        font-size: 1rem;
        line-height: 1.8;
    }

    .entry-content h1 {
        font-size: 1.6rem;
    }

    .entry-content h2 {
        font-size: 1.4rem;
    }

    .entry-content h3 {
        font-size: 1.2rem;
    }

    .entry-content blockquote {
        padding: 15px 20px;
        margin: 1.5em 0;
    }

    .entry-content table {
        font-size: 0.9em;
    }

    .entry-content th,
    .entry-content td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {

    #primary.site-main,
    .site-main {
        padding: 30px 15px 50px;
    }

    .entry-title {
        font-size: 1.5rem;
    }

    .entry-header {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .entry-content h2 {
        font-size: 1.25rem;
    }

    /* Make tables scrollable on mobile */
    .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ==========================================================================
   Dark Page Background Option (Optional)
   ========================================================================== */
body.dark-page article.page {
    background: #1a1a1a;
    color: #ddd;
}

body.dark-page .entry-title {
    color: #fff;
}

body.dark-page .entry-content h1,
body.dark-page .entry-content h2,
body.dark-page .entry-content h3,
body.dark-page .entry-content h4,
body.dark-page .entry-content h5,
body.dark-page .entry-content h6 {
    color: #fff;
}

body.dark-page .entry-header,
body.dark-page .entry-footer {
    border-color: #333;
}