@media print {
    body {
        font-size: 12pt;
        position: relative;
        z-index: 1;
    }
    
    /* Hide unwanted elements during print */
    #navigation, .skip-link, .no-print, .menu-main-menu-container, #htp24_footer, .htpcookie, #optOutUsage, #actioncontain, #actionline,
    .home #htp_pagetitle, #search-overlay, .page-template-page-ptx-program .entry-content > p, #search-icon, .scroll-indicator, hr, #htplogosvg, #optOutUsage, .htp-corner, .entry-footer {
        display: none !important;
    }
    .entry-content { background: none; }

    #header {
        height: 0;
    }
    
    #wrapper {
        position: relative;
        overflow: auto !important;
        border: 0 !important;
        top: 0 !important;
        height: 100% !important;
        border-image: none;
        background: none;
        width: 100%;
        overflow: hidden;
        scrollbar-color: #ffffff transparent;
    }

    #content { page-break-inside: avoid; }
    
    #map {
        margin-top: 0 !important;
    }
    
    #htp_pagetitle text {
        fill: #000000 !important;
    }
    
    #HTP24_Logo_Shape_container {
        fill: #000000 !important;
    }
    
    .entry-content, .entry-summary, #article.container, .entry-content p, .entry-summary p, .entry-content ul, .entry-summary ul {
        margin: 0;
        padding: 0 !important;
        width: 100% !important;
    }
    
    #ObjHTP24 {
        opacity: 0.5;
    }
    
  
    #objdate {
        margin-left: 0 !important;
        left: -6vw !important;
        top: 0;
        width: 200vw !important;
        position: absolute !important;
    }
    #objdate #htp24_do1 { opacity: 1; }

    h1.htp_festival {
        font-size: 1.6rem !important;
        margin-top: 0;
        margin-left: -50vw;
    }
    
    p {
        margin-bottom: 2rem !important;
    }
    
    .page-template-page-ptx-program .entry-content {
        margin-top: -6vh;
    }
    .page-template-page-ptx-program .btn.active { margin-bottom: 0 !important; }
    .page-template-page-ptx-program .btn { mask-image: none; -webkit-mask-image: none; }


  #day-content { background-color: #ffffff; }
    td.alert { -webkit-print-color-adjust: exact; color-adjust: exact; }


  #filters .btn.htp_kultur, .entry-meta.htp_kultur, li.htp_kultur, .alert.htp_kultur, .bg-soft-htp_kultur, .htp_kultur .htp_badges .badge { /* "Kultur" */
    background-color: rgba(var(--htp-ethges),.42) !important;
      border-color: rgba(var(--htp-ethges),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }
  #filters .btn.htp_digisev, .entry-meta.htp_digisev, li.htp_digisev, .alert.htp_digisev, .bg-soft-htp_digisev, .htp_digisev .htp_badges .badge { /* "Digitale Selbstverteidigung" */
    background-color: rgba(var(--htp-digisev),.42) !important;
      border-color: rgba(var(--htp-digisev),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }
  #filters .btn.htp_andere, .entry-meta.htp_andere, li.htp_andere, .alert.htp_andere, .bg-soft-htp_andere, .htp_andere .htp_badges .badge {
    background-color: rgba(var(--htp-andere),.42) !important;
      border-color: rgba(var(--htp-andere),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }
  #filters .btn.htp_error, .entry-meta.htp_error, li.htp_error, .alert.htp_error, .bg-soft-htp_error {
    background-color: rgba(var(--htp-error),.42) !important;
      border-color: rgba(var(--htp-error),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }
  #filters .btn.htp_ethges, .entry-meta.htp_ethges, li.htp_ethges, .alert.htp_ethges, .bg-soft-htp_ethges, .htp_ethges .htp_badges .badge {
      background-color: rgba(var(--htp-kultur),.42) !important;
      border-color: rgba(var(--htp-kultur),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }


  .htp_socials, .htp_digisev.socialize {
    background-color: rgba(var(--htp-socials),.42) !important;
      border-color: rgba(var(--htp-socials),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }
  .specials {
    background-color: rgba(var(--htp-specials),.42) !important;
      border-color: rgba(var(--htp-specials),.84) !important; 
     -webkit-print-color-adjust: exact; color-adjust: exact;
   }





body.single-htpp, body.htp_onsite_screens, .htp_onsite_screens div, .htp_onsite_screens section, .htp_onsite_screens article, .htp_onsite_screens aside, .htp_onsite_screens header, .htp_onsite_screens footer, .htp_onsite_screens nav {
    background: none !important;
    box-shadow: none !important;
    color: #000 !important; /* Use black text for better readability */
}

/* Reset padding and margins */
body.single-htpp, body.htp_onsite_screens, .htp_onsite_screens div, .htp_onsite_screens section, .htp_onsite_screens article, .htp_onsite_screens aside, .htp_onsite_screens header, .htp_onsite_screens footer, .htp_onsite_screens nav {
    margin: 0 !important;
    padding: 0 !important;
}

.single-htpp .entry-meta { background-color: #ffffff !important;  }
.single-htpp .entry-meta-list h3 { display: none;  }
.single-htpp .htpx_abstract, .single-htpp .entry-content, .single-htpp .entry-meta { padding: 0.5rem 0 !important; margin: 0.5rem 0 !important; }
.single-htpp .htpx_abstract p { max-width: 100%;}

.htp_onsite_screens #container, .single-htpp #container { max-width: 100%; }

  .htp_onsite_screens { background: #ffffff; color: #000000; }
  .htp_onsite_screens #sizeInfo, .htp_onsite_screens #canvas-image, .htp_onsite_screens #screen_arrows, .htp_onsite_screens #objectHolder, .htp_onsite_screens #htp24_footer, .htp_onsite_screens #no_smoking { display: none !important; }
  .htp_onsite_screens .htpx_listing li { display: block !important; transform: scale(1); transform-origin: center 1vh; page-break-inside: avoid; }

  .htp_onsite_screens #wrapper { top: 0; height: 100% !important; }
  .htp_onsite_screens #content { min-height: 100vh; height: auto !important; }
  .htp_onsite_screens #content::before { content: none; }
  .htp_onsite_screens .single-screen-content span { display: block; opacity: 1 !important; height: auto !important; }

    #htp_print_location {
        page-break-inside: avoid; 
        font-size: 14pt;
        margin-top: 4cm; /* Adjust as needed */
        text-align: left;
        display: block;
    }


    #htp_print_pageqr {
        display: block;
        width: 100%;
        text-align: center; /* Center the images */
        margin-top: 20px; /* Add spacing above, adjust as needed */
    }

    /* Align the images in a row */
    #htp_print_pageqr img {
        display: inline-block;
        width: 25%; /* Adjust width as needed to fit in a row */
        height: auto;
        margin: 0 10px; /* Add spacing between images */
        vertical-align: middle; /* Align images vertically */
    }

    /* Optional: Ensure images don't break across pages */
    #htp_print_pageqr {
        page-break-inside: avoid;
    }



    /* Repeating header */
    @page {
      margin-top: 1.5cm !important;
      margin-right: 1.5cm !important;
      margin-bottom: 1.5cm !important;
      margin-left: 1.5cm !important;
    }


    @supports (-moz-appearance: none) {
        @page {
            margin-top: 1.5cm !important;  /* Adjust Firefox margins if needed */
            margin-right: 0cm !important;
            margin-bottom: 1.5cm !important;
            margin-left: 0cm !important;
        }

    }


    #htplogoprint {
        position: fixed;
        width: 150px;
        top: 0;
        right: 0;
        z-index: 9999;
        display: block;
        position: running(header); /* Declare the logo as part of the header that will run on every page */
    }

    .single-htpp #htplogoprint {
      position: fixed !important;
      display: block !important;
      top: 0; 
      right: 0; 
      margin: 0 auto;
    }
    

    @page {
        @top-right {
            content: element(htplogoprint);
        }
    }

    .single-htpp @page:first {
        @top-right {
            content: element(htplogoprint);
        }
    }
    .single-htpp @page {
      #htplogoprint { width:50px !important }
    }


    /* Target the last page */
    @page:last {
        #htp_print_location, #htp_print_pageqr {
            display: block !important; /* Make location and QR code visible */
            page-break-before: always; /* Ensure it starts on a new page */
        }
    }
}




@media print and (orientation: portrait) {
  body {
    color: black;
  }
}

@media print and (orientation: landscape) {
  body {
    font-size: 11pt !important;
  }
  h1.htp_festival { margin-left: -50vw; }
  #objdate { margin-left: 0 !important; left: 75vw; top: -5vh; width: 360px; }
  #article.container { width: 85% !important; }
}