/* 
 * print.css — AtölyeBia Theme
 * This stylesheet is only loaded for media="print".
 * It strips away UI clutter to provide a clean document for printing.
 */

@media print {
    /* 1. Hide UI Elements */
    .header--desktop,
    .header--mobile,
    .social-wrapper,
    .menu-wrapper,
    .footer--big,
    .social,
    #searchOverlay,
    #mobile-menu,
    #scrollToTop,
    .scroll-to-top,
    .newsletter-section,
    .newsletter-medium,
    .pagination,
    .categories,
    .share-buttons,
    .social-share,
    .related-posts,
    .comment-respond,
    .comments-area,
    .breadcrumb,
    .section-title .more,
    .btn,
    .button,
    [data-action],
    .share,
    .share--mobil,
    .other-articles,
    .xinfo .authors {
        display: none !important;
    }

    /* 2. Global Resets */
    body {
        background: #fff !important;
        margin: 0;
        padding: 0;
    }

    /* 3. Container Adjustments */
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .row {
        display: block !important;
        margin: 0 !important;
    }

    [class*="col-"] {
        width: 100% !important;
        max-width: none !important;
        flex: 0 0 100% !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
    }

    /* 4. Branding & Logo */
    /* Hide ALL default header elements in print in favor of our new custom centered logo */
    .header--desktop,
    .header--mobile,
    .print-only-header {
        display: none !important;
    }

    /* Style the new centered print logo added to single-haberler.php */
    .print-only-logo {
        display: block !important;
        margin: 0 auto 40px auto !important;
        text-align: center !important;
        width: 120px !important;
        height: 120px !important;
    }

    .print-only-logo img {
        width: 120px !important;
        height: 120px !important;
        object-fit: contain !important;
    }

    /* Style the dynamic article URL added to the end of content */
    .print-only-url {
        display: block !important;
        margin-top: 40px !important;
        padding-top: 20px !important;
        border-top: 1px solid #eee !important;
        font-size: 10pt !important;
        color: #666 !important;
        text-align: left !important;
    }

    /* 5. Typography & Content */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, img {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline !important;
    }

    /* 6. Media Handling */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 15px auto !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .iframe-container,
    .embed-responsive {
        display: none !important;
    }

    blockquote {
        border-left: 4pt solid #eee;
        margin: 20px 0;
        padding: 10px 20px;
        font-style: italic;
    }

    /* 7. Specific Section Fixes */
    /* Hide the entire sidebar and any content after the main article body */
    .col-3, 
    .related-news, 
    .latest-news, 
    .side-box, 
    .other-articles,
    #searchOverlay,
    #modal-share,
    .modal {
        display: none !important;
    }

    .news-body {
        position: relative;
        top: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 20px 0 !important;
        background: transparent !important;
    }

    /* Force Desktop Layout for Authors in Print */
    .xxinfo .authors .title {
        display: none !important; /* Hide mobile-only "YAZARLAR" label */
    }

    .xxinfo .authors div.author {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        text-align: left !important;
        margin-bottom: 40px !important;
        border-bottom: 1px solid #eee !important;
        padding-bottom: 20px !important;
    }

    .xxinfo .authors div.author > img {
        display: block !important;
        width: 80px !important;
        height: 80px !important;
        margin-left: 0 !important;
        margin-right: 20px !important;
        border-radius: 50% !important;
    }

    .xxinfo .authors .author-wrapper {
        flex: 1 !important;
    }

    .xxinfo .authors .author-inner {
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-bottom: 5px !important;
        margin-bottom: 10px !important;
    }

    .xxinfo .authors .author-inner .name {
        padding-left: 0 !important;
        text-align: left !important;
        width: auto !important;
    }

    /* HIDE Social and More Link as requested */
    .xxinfo .authors .author-inner .info .social,
    .xxinfo .authors .author-inner .more {
        display: none !important;
    }

    .xxinfo .authors .txt {
        display: block !important;
        padding-left: 0 !important;
        padding-top: 5px !important;
    }

    .top-image {
        margin-bottom: 20px !important;
    }

    .top-image img {
        border-radius: 0 !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
    }

    /* Ensure specific styled elements keep their colors without global overrides */
    .tag, .series, .label {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .news-list, .news-list-full {
        padding: 0 !important;
    }

    .educational-selection, .editorial-selection, .editorial-selection-mobile {
        display: none !important;
    }
}
