/* ===================================
   Print Stylesheet for Elegant PDFs
   =================================== */

/* Hide non-essential elements */
header,
nav,
.header,
.navigation,
.nav,
.menu,
footer,
.footer,
.sidebar,
.aside,
aside,
.comments,
.social-share,
.cookie-banner,
.popup,
.modal,
.advertisement,
.ads,
form:not(.contact-info),
button:not(.contact-info button),
.cta-button,
.back-to-top,
.breadcrumbs,
.related-posts,
video,
iframe:not(.map),
.video-player,
script,
.no-print {
    display: none !important;
}

/* Page setup */
@page {
    size: A4;
    margin: 2cm 1.5cm;
}

/* Reset and base styles */
* {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
    background: #fff;
    margin: 0;
    padding: 0;
}

/* Main content area */
main,
.main-content,
.content,
article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #000;
    page-break-after: avoid;
    page-break-inside: avoid;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

h1 {
    font-size: 24pt;
    margin-top: 0;
    border-bottom: 2pt solid #333;
    padding-bottom: 0.3em;
}

h2 {
    font-size: 18pt;
    margin-top: 1.2em;
}

h3 {
    font-size: 14pt;
}

h4, h5, h6 {
    font-size: 12pt;
}

/* Paragraphs and text blocks */
p {
    margin: 0 0 1em 0;
    orphans: 3;
    widows: 3;
}

/* Links */
a {
    color: #000;
    text-decoration: underline;
}

a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
}

a[href^="#"]:after,
a[href^="javascript"]:after {
    content: "";
}

/* Lists */
ul, ol {
    margin: 0 0 1em 1.5em;
    padding: 0;
}

li {
    margin-bottom: 0.5em;
}

/* Images */
img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
    display: block;
    margin: 1em 0;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    page-break-inside: avoid;
}

thead {
    display: table-header-group;
}

th, td {
    border: 1pt solid #000;
    padding: 8pt;
    text-align: left;
}

th {
    background: #f0f0f0 !important;
    font-weight: bold;
}

/* Blockquotes */
blockquote {
    margin: 1em 2em;
    padding: 0.5em 1em;
    border-left: 3pt solid #333;
    font-style: italic;
    page-break-inside: avoid;
}

/* Code blocks */
pre, code {
    font-family: "Courier New", Courier, monospace;
    font-size: 10pt;
    border: 1pt solid #ccc;
    background: #f5f5f5 !important;
    page-break-inside: avoid;
}

pre {
    padding: 10pt;
    margin: 1em 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

code {
    padding: 2pt 4pt;
}

/* Utility classes */
.page-break {
    page-break-after: always;
}

.no-break {
    page-break-inside: avoid;
}

/* Service-specific styling */
.service-card,
.feature-box,
.info-box {
    border: 1pt solid #ccc;
    padding: 10pt;
    margin: 1em 0;
    page-break-inside: avoid;
}

.price,
.contact-info {
    font-weight: bold;
    font-size: 13pt;
}

/* Remove decorative elements */
.background-image,
.parallax,
.animation,
.carousel,
.slider {
    display: none !important;
}

/* Optimize spacing */
.container,
.wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Print-specific visibility */
.print-only {
    display: block !important;
}

/* Add page numbers (optional - browser support varies) */
@page {
    @bottom-right {
        content: counter(page) " of " counter(pages);
        font-size: 9pt;
        color: #666;
    }
}