
        @media (max-width: 900px) {
            #mc-popup-btn {
                align-self: center !important;
                margin: 0 auto;
                display: block;
            }
        }
    

        .category-button:focus,
        .year-button:focus {
            outline: none;
        }

        .category-button.active,
        .year-button.active {
            text-decoration: underline;
        }

        @media (max-width: 800px) {
            .nav-override {
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        .year-filter {
            gap: 0rem;
            display: flex;
            justify-content: start;
            text-align: start;
        }

        .year-button {
            cursor: pointer;
            background: none;
            border: none;
            color: black;
        }

        .filter-container {
            display: flex;
            flex-direction: column;
        }

        .category-search-container {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 10px;
            width: 100%;
        }

        .category-button {
            cursor: pointer;
            background: none;
            border: none;
            color: black;
        }

        .category-button h2 {
            font-size: 1.1rem;
            text-align: start;
            margin: 0;
        }

        .heritage-button {
            display: flex;
            flex-direction: row;
            align-items: baseline;
            gap: 5px;
        }

        .heritage-button h3 {
            text-align: start;
            font-size: 0.7rem;
            margin: 0;
        }


        .category-filter {
            display: flex;
            justify-content: start;
            flex-wrap: wrap;
            gap: 0.2rem;
        }

        .year-button h2 {
            font-size: 1.2rem;
            text-align: start;
            margin: 0;
        }

        .year-button:hover {
            /* underline */
            text-decoration: underline;
        }

        .category-button:hover {
            /* underline */
            text-decoration: underline;
        }

        .search-bar {
            display: flex;
            align-items: center;
            background: #f2f2f2;
            border-radius: 5px;
            padding: 5px 6px;
            width: 100%;
            max-width: 300px;
            overflow: hidden;
            border: 1px solid #ccc;
            flex-shrink: 0;
            gap: 6px;
        }

        .search-input {
            width: 100%;
            font-size: 1rem;
            padding: 2px 3px;
            border-radius: 5px;
            background-color: rgb(255, 255, 255);
        }

        #film-search {
            border: none;
            outline: none;
            background: transparent;
            font-size: 16px;
            flex: 1;
        }

        #film-category {
            padding: 8px;
            font-size: 16px;
            border-radius: 5px;
            border: 1px solid #ccc;
        }

        .films-container {}

        .film-year-row {
            margin-bottom: 10px;
            text-align: start;
            border-radius: 5px;
        }

        .film-year-row h3 {
            color: black;
            margin: 0;
            font-size: 1.2rem;
        }

        .films-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 20px;
            padding-bottom: 20px;
        }

        .film-item {
            position: relative;
            overflow: hidden;
            transition: transform 0.2s ease-in-out;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .film-item:hover {
            transform: scale(1.05);
        }

        .film-thumbnail {
            width: 100%;
            position: relative;
            /* 2:3 aspect ratio */
        }

        .film-thumbnail img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            background-color: rgba(0, 0, 0, 0.03);
            height: 100%;
            object-fit: cover;
        }

        .film-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: background 0.3s ease, opacity 0.3s ease;
        }

        .film-item:hover .film-overlay {
            background: rgba(0, 0, 0, 0.6);
            opacity: 1;
        }

        .film-title {
            color: #fff;
            font-size: 18px;
            font-weight: bold;
            text-align: center;
            padding: 10px;
        }

        .film-director {
            color: #fff;
            font-size: 16px;
            font-weight: semi-bold;
            text-align: center;
            padding: 10px;
        }

        @media (max-width: 1200px) {
            .category-button h2 {
                font-size: 18px;
                text-align: start;
                margin: 0;
            }

            .year-button h2 {
                font-size: 18px;
                text-align: start;
                margin: 0;
            }
        }

        @media (max-width: 1200px) {
            .filter-container {
                flex-direction: column;
                align-items: stretch;
            }

            .search-bar {
                max-width: 100%;
                margin-top: 10px;
            }
        }

        /* Make the grid more responsive */
        @media (max-width: 1600px) {
            .films-grid {
                grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
            }
        }

        /* Make the grid more responsive */
        @media (max-width: 1200px) {
            .films-grid {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
        }

        @media (max-width: 768px) {
            .films-grid {
                grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            }
        }

        @media (max-width: 480px) {
            .films-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));

                // Set global production mode for meta tags
                global $salaud_morisset_production_mode;
                $salaud_morisset_production_mode =$productionMode;
            }
        }
    

        .film-image {
            /* width: 100%; */
            height: auto;
            object-fit: cover;
        }

        .search-visible {}

        .hidden {
            display: none !important;
        }

        .hidden-button {
            display: none !important;
        }

        .load-more-btn {
            display: block !important;
            margin: 40px auto;
            padding: 10px 20px;
            outline: none;
            border: none;
            text-decoration: underline;
            text-decoration-thickness: 1px;
            text-underline-offset: 5px;
            color: black;
            font-weight: light;
            background: none;
            font-size: 1.2rem;
            cursor: pointer;
        }

        .load-more-btn:hover {
            background: rgb(204, 204, 204);
        }

        /* Basic styles; adjust selectors if needed for year grouping and section headers */
        .type-button:focus {
            outline: none;
        }

        .first-visible-films-section h2 {
            margin: 25px 0 25px !important;
        }

        .category-title {
            font-size: 2.2rem;
            margin: 40px 0 -15px;
            color: #333;
        }

        .heritage-section-title,
        .heritage-catalogue-title {
            font-size: 2rem;
            margin: 25px 0 25px !important;
            color: #333;
        }

        .heritage-catalogue .films-section h2 {
            margin: 25px 0 25px;
        }

        .filter-container {
            display: flex;
            width: 100%;
            flex-direction: row;
            min-height: 4rem;
            margin-bottom: 2.5rem;
            /* background-color: blue; */
        }

        @media (max-width: 1200px) {
            .filter-container {
                flex-direction: column;
                align-items: stretch;
                gap: 1rem;
            }
        }

        .type-button.active {
            text-decoration: underline;
            text-decoration-color: black;
            text-decoration-thickness: 1px;
            text-underline-offset: 5px;
        }

        .year-button:focus,
        .all-year:focus,
        .inf-year:focus,
        .heritage-catalogue-filter-button:focus {
            outline: none;
        }

        .year-button.active,
        .all-year.active,
        .inf-year.active,
        .heritage-catalogue-filter-button.active {
            text-decoration: underline;
            text-decoration-color: black;
            text-decoration-thickness: 1px;
            text-underline-offset: 5px;
        }

        .year-button,
        .all-year,
        .heritage-catalogue-filter-button {
            cursor: pointer;
            background: none;
            border: none;
            color: black;
        }

        .type-search-container {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            gap: 10px;
            width: 100%;
            flex-direction: column;
        }

        .year-filter2,
        .heritage-catalogue-filter {
            display: flex;
            flex-wrap: wrap;
        }

        .heritage-catalogue-filter {
            display: none;
        }

        @media (max-width: 1060px) {
            .year-filter2,
            .heritage-catalogue-filter {
                gap: 1rem;
            }

            .type-search-container {
                flex-direction: column;
                gap: 1rem;
                align-items: stretch;
            }

            .type-filter {
                gap: 1rem !important;
            }
        }

        .type-filter {
            display: flex;
            align-items: flex-start;
            justify-content: flex-start;
            padding-right: 1rem;
            flex-wrap: wrap;
            width: 100%;
            gap: 1.5rem;
        }

        .type-button {
            cursor: pointer;
            background: none;
            border: none;
        }

        .type-button h2 {
            color: black;
            font-size: 1.2rem;
            font-weight: 500 !important;
            font-family: Manrope, sans-serif;
            margin: 0;
            font-display: swap;
        }

        @media (max-width: 1200px) {
            .year-button h2 {
                font-size: 18px;
                text-align: start;
                margin: 0;
            }

            .search-bar {
                min-width: 90%;
            }
        }

        .year-button h2,
        .all-year h2,
        .inf-year h2,
        .heritage-catalogue-filter-button h2 {
            font-size: 1.2rem;
            font-family: Manrope, sans-serif;
            font-weight: 300 !important;
            text-align: start;
            margin: 0;
            font-display: swap;
        }

        .year-button:hover {
            /* underline */
            text-decoration: none;
        }

        .film-thumbnail {
            width: 100%;
            height: auto;
            position: relative;
            aspect-ratio: 0.667;
        }

        @media (max-width: 1200px) {
            .type-button h2 {
                font-size: 1rem;
                margin: 0;
            }

        }



        .heritage-button {
            display: flex;
            flex-direction: row;
            align-items: baseline;
            gap: 5px;
        }

        .heritage-button h3 {
            font-size: 0.7rem;
            margin: 0;
        }

        .search-bar {
            display: flex;
            align-items: center;
            /* background: #f2f2f2; */
            border-radius: 1px;
            padding: 5px 6px;
            width: 50%;
            overflow: hidden;
            height: fit-content;
            border-bottom: 2px solid #ccc;
            gap: 6px;
        }

        .search-input {
            width: 100%;
        }

        #film-search {
            border: none;
            outline: none;
            background: transparent;
            font-size: 16px;
            flex: 1;
        }

        .films-container {
            margin-top: 20px;
        }

        .all-films-container {
            margin-top: 20px;
        }

        h2 {
            font-size: 1.5rem;
        }

        .first-category-title {
            font-size: 2rem;
            margin: 25px 0 25px !important;
            color: #333;
        }

        .films-section h2 {
            font-size: 2rem;
            margin: 80px 0 25px;
            color: #333;
        }

        .film-year-row {
            margin-bottom: 10px;
            margin-top: 15px;
            text-align: start;
        }

        .film-year-row h3 {
            color: black;
            margin: 0;
            font-size: 1rem;
        }

        .films-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 20px;
        }

        @media (max-width: 1600px) {
            .films-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 1200px) {
            .films-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 768px) {
            .films-grid {
                grid-template-columns: repeat(2, 1fr);
            }

        }

        @media (max-width: 480px) {
            .films-grid {
                grid-template-columns: 1fr;
            }
        }

        .film-item {
            position: relative;
            overflow: hidden;
            transition: transform 0.2s ease-in-out;
        }

        .film-item:hover {
            transform: scale(1.02);
        }


        .film-thumbnail img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .film-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: background 0.3s ease, opacity 0.3s ease;
        }

        .film-item:hover .film-overlay {
            background: rgba(0, 0, 0, 0.6);
            opacity: 1;
        }

        .film-title {
            color: #fff;
            font-size: 1rem;
            font-weight: bold;
            text-align: center;
            padding-left: 0.7rem;
            padding-right: 0.7rem;
        }

        .film-director {
            color: #fff;
            font-size: 0.9rem;
            text-align: center;
            padding-left: 0.7rem;
            padding-right: 0.7rem;
        }

        @media (max-width: 1600px) {
            .film-title {
                font-size: 0.8rem;
            }

            .film-director {
                font-size: 0.75rem;
            }
        }
    

/* Match the first section spacing before the filter script runs. */
.all-films-container > .films-section:first-child h2 {
    margin-top: 25px !important;
}
