/*
Theme Name: Single File Theme
Description: Print stylesheet for optimized printing and PDF generation
Version: 1.0
*/

/* Remove non-essential elements */
.site-header,
.primary-navigation,
.header-menu,
.breadcrumbs,
.sidebar,
.footer-widgets,
.social-share,
.share-buttons,
.post-navigation,
.related-posts,
.pagination,
.header-featured-image,
nav,
.search-form {
    display: none !important;
}

/* Reset layout for print */
body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

/* Container adjustments */
.container,
.content-wrapper,
.main-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    float: none;
}

/* Typography for print */
h1 {
    font-size: 24pt;
    margin-top: 0;
}

h2 {
    font-size: 18pt;
    page-break-after: avoid;
}

h3 {
    font-size: 14pt;
    page-break-after: avoid;
}

h4,
h5,
h6 {
    font-size: 12pt;
    page-break-after: avoid;
}

p,
li {
    font-size: 12pt;
    orphans: 3;
    widows: 3;
}

/* Avoid page breaks inside elements */
blockquote,
pre,
img,
figure,
table,
tr {
    page-break-inside: avoid;
}

/* Show URLs for links */
a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
}

/* Don't show URLs for internal navigation */
a[href^="#"]:after,
a[href^="javascript:"]:after {
    content: "";
}

/* Header styling */
.header-identity h1 {
    font-size: 20pt;
    margin-bottom: 5pt;
    border-bottom: 2pt solid black;
    padding-bottom: 5pt;
}

.header-identity p {
    font-size: 11pt;
    font-style: italic;
    margin-bottom: 20pt;
}

/* Post title */
.post-title,
article h1 {
    font-size: 22pt;
    margin-top: 10pt;
    margin-bottom: 10pt;
    page-break-after: avoid;
}

/* Post meta */
.post-meta {
    font-size: 10pt;
    color: #666;
    margin-bottom: 15pt;
    padding-bottom: 10pt;
    border-bottom: 1pt solid #ccc;
}

.post-meta a:after {
    content: "";
}

/* Content styling */
.e-content {
    font-size: 12pt;
    line-height: 1.6;
}

.e-content img {
    max-width: 100%;
    height: auto;
    page-break-inside: avoid;
}

.e-content pre,
.e-content code {
    background: #f5f5f5;
    border: 1pt solid #ddd;
    font-size: 10pt;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.e-content blockquote {
    border-left: 3pt solid #333;
    padding-left: 15pt;
    margin: 10pt 0;
    font-style: italic;
}

/* Tables */
.e-content table {
    border-collapse: collapse;
    width: 100%;
    font-size: 10pt;
}

.e-content th,
.e-content td {
    border: 1pt solid #333;
    padding: 5pt;
}

.e-content th {
    background: #f0f0f0;
    font-weight: bold;
}

/* Category sections for homepage */
.category-section {
    page-break-inside: avoid;
    margin-bottom: 20pt;
}

.category-section-header {
    font-size: 14pt;
    font-weight: bold;
    border-bottom: 1pt solid black;
    margin-bottom: 10pt;
    padding-bottom: 5pt;
}

.post-list {
    margin-left: 0;
    padding-left: 0;
}

.post-item {
    margin-bottom: 10pt;
}

.post-item a:after {
    content: "";
}

/* Featured post */
.featured-post {
    page-break-inside: avoid;
    margin-bottom: 20pt;
    padding-bottom: 15pt;
    border-bottom: 2pt solid black;
}

.featured-post-excerpt {
    border-left: 3pt solid black;
    padding-left: 10pt;
}

/* Remove backgrounds and shadows */
* {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Ensure black text for readability */
body,
p,
li,
td,
th,
blockquote,
.e-content {
    color: black !important;
}

/* Links should be visible */
a,
a:visited {
    color: #0066cc !important;
    text-decoration: underline;
}

/* Ruled headers */
.ruled {
    border-bottom: 2pt solid black;
    padding-bottom: 3pt;
    margin-bottom: 10pt;
}

/* Archive headers */
.archive-header {
    text-align: left;
    margin-bottom: 20pt;
    padding-bottom: 10pt;
    border-bottom: 2pt solid black;
}

.archive-title {
    font-size: 18pt;
}

.archive-description {
    font-size: 12pt;
}

/* Footer */
footer {
    margin-top: 30pt;
    padding-top: 10pt;
    border-top: 1pt solid black;
}

.footer-bottom {
    font-size: 10pt;
    text-align: center;
}
