@media print {
    @page {
        size: auto;
        margin: 15mm;
    }

    body {
        background: white;
        color: black;
        padding: 0;
        margin: 0;
        font-size: 12pt;
        line-height: 1.4;
    }

    h1 {
        page-break-before: auto; 
    }
    
    h1:not(:first-of-type) {
        page-break-before: always; 
    }

    h1, h2, h3, .site-content {
        page-break-inside: avoid;
    }

    img, figure, .movie-item, .table-img {
        page-break-inside: avoid;
        break-inside: avoid-page;
        max-width: 100%;
        height: auto;
        filter: grayscale(100%) contrast(120%);
    }

    a {
        color: black;
        text-decoration: underline;
    }
    a::after {
        content: none;
    }

    header, 
    footer, 
    .navbar,
    .carousel,
    .ghibli-btn-container,
    .slider-arrow,
    #click-cover,
    .content-banner figure figcaption,
    iframe,
    button,
    .trailer-container,
    .trailer-overlay,
    .play-button,
    .trailer-info,
    .trailer-text,
    #split-bar,
    .nav-buttons,
    .ghibli-decoration,
    .divider, details {
        display: none;
    }

    h1 {
        font-family: 'Koulen', Impact, Arial, sans-serif;
        font-size: 2rem;
        border-bottom: 2px solid black;
    }

    h2 {
        font-family: 'Khand', Arial, Tahoma, sans-serif;
        font-size: 1.6rem;
        background-color: transparent;
        color: black;
    }

    h2.form-h2 {
        background-color: transparent !important;
        color: black !important;
        padding: 0 !important;
    }

    p {
        font-size: 1rem;
        text-align: justify;
    }

    .movie-slider {
        display: block !important;
        width: 100%;
    }

    .movie-item {
        display: inline-block;
        width: 30%;
        margin: 0 1% 20px 0;
        page-break-inside: avoid;
    }

    .movie-poster {
        width: 100%;
        height: auto;
        max-height: 500px; 
        object-fit: contain;
    }

    table.custom-responsive-table {
        width: 100%;
        margin: 20px 0;
        page-break-inside: avoid;
        border-collapse: collapse;
    }

    table.custom-responsive-table thead,
    table.custom-responsive-table tbody {
        display: table-row-group;
    }

    table.custom-responsive-table tr {
        display: table-row;
        page-break-inside: avoid;
    }

    table.custom-responsive-table th,
    table.custom-responsive-table td {
        width: 33.33%;
        display: table-cell;
        padding: 8px;
        text-align: center;
        vertical-align: top;
        border: 1px solid #ddd;
    }

    .contact-table-img {
        max-height: 200px;
        width: auto;
        margin: 0 auto;
        display: block;
    }

    form#ghibli-form {
        page-break-inside: avoid;
    }

    .input-group {
        margin-bottom: 15px;
        page-break-inside: avoid;
    }

    .radio-group, .checkbox-group {
        margin: 15px 0;
        page-break-inside: avoid;
    }

    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .button-group {
        display: none;
    }
}