/* =====================================================
           CATHOLIC G33K — HEADER SEARCH
           Scoped to the custom header only.
        ===================================================== */

        .cg-header .cg-header-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        /* =====================================================
           HEADER DESKTOP LAYOUT
           Keeps logo, navigation, and search from overlapping
           while preserving a single-line navigation.
        ===================================================== */

        .cg-header .cg-header-inner {
            display: flex;
            align-items: center;
            width: 100%;
            max-width: none;
            box-sizing: border-box;
            gap: 18px;
            padding-left: 18px;
            padding-right: 18px;
        }

        .cg-header .cg-logo {
            flex: 0 0 auto;
            margin: 0;
        }

        .cg-header .cg-nav {
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: nowrap;
            gap: 13px;
            white-space: nowrap;
        }

        .cg-header .cg-nav a {
            flex: 0 0 auto;
            font-size: 11px;
            line-height: 1;
            white-space: nowrap;
        }

        .cg-header .cg-header-actions {
            flex: 0 0 auto;
            min-width: 0;
        }

        /*
         * Medium desktop / laptop widths:
         * preserve one line by tightening spacing and the search box
         * before switching to the mobile layout.
         */
        @media (min-width: 1101px) and (max-width: 1380px) {
            .cg-header .cg-header-inner {
                gap: 10px;
                padding-left: 12px;
                padding-right: 12px;
            }

            .cg-header .cg-nav {
                gap: 8px;
            }

            .cg-header .cg-nav a {
                font-size: 10px;
                letter-spacing: 0.08em;
            }

            .cg-header .cg-header-actions {
                gap: 6px;
            }

            .cg-header .cg-search-form-desktop {
                width: 110px;
                padding-left: 8px;
                padding-right: 5px;
            }

            .cg-header .cg-search-input {
                font-size: 8px;
                letter-spacing: 0.08em;
            }
        }

        .cg-header .cg-search-form {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .cg-header .cg-search-form-desktop {
            display: flex;
            align-items: center;
            width: 180px;
            height: 31px;
            padding: 0 7px 0 12px;
            background: rgba(8, 10, 16, 0.88);
            border: 1px solid rgba(154, 164, 184, 0.26);
            transition:
                border-color 0.2s ease,
                background-color 0.2s ease;
        }

        .cg-header .cg-search-form-desktop:hover,
        .cg-header .cg-search-form-desktop:focus-within {
            background: rgba(12, 15, 23, 0.96);
            border-color: rgba(255, 180, 0, 0.68);
        }

        .cg-header .cg-search-input {
            flex: 1;
            min-width: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            border: 0 !important;
            outline: 0 !important;
            box-shadow: none !important;
            appearance: none;
            -webkit-appearance: none;
            background: transparent !important;
            color: #f4efe3 !important;
            font-family:
                var(--cg-font-mono),
                "Courier New",
                monospace;
            font-size: 9px;
            font-weight: 400;
            line-height: 1;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .cg-header .cg-search-input::placeholder {
            color: rgba(190, 195, 208, 0.72);
            opacity: 1;
        }

        .cg-header .cg-search-input::-webkit-search-cancel-button {
            cursor: pointer;
            filter: invert(1);
            opacity: 0.55;
        }

        .cg-header .cg-search-submit {
            flex: 0 0 auto;
            width: 24px;
            height: 100%;
            margin: 0;
            padding: 0;
            display: inline-grid;
            place-items: center;
            border: 0;
            outline: 0;
            box-shadow: none;
            background: transparent;
            color: rgba(220, 224, 235, 0.82);
            font-family: inherit;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .cg-header .cg-search-submit:hover,
        .cg-header .cg-search-submit:focus {
            color: #ffb400;
        }

        .cg-header .cg-mobile-search-form {
            display: flex;
            align-items: center;
            width: 100%;
            min-height: 44px;
            margin: 10px 0;
            padding: 0 10px 0 14px;
            box-sizing: border-box;
            background: rgba(8, 10, 16, 0.92);
            border: 1px solid rgba(154, 164, 184, 0.3);
        }

        .cg-header .cg-mobile-search-form:focus-within {
            border-color: rgba(255, 180, 0, 0.7);
        }

        .cg-header .cg-mobile-search-form .cg-search-input {
            font-size: 10px;
        }

        .cg-header .screen-reader-text {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            clip-path: inset(50%) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }

        /* =====================================================
           RESPONSIVE SAFEGUARDS
           Explicitly separate desktop and mobile header UI.
        ===================================================== */

        @media (max-width: 1100px) {

            /* Never show the desktop navigation bar on phones/tablets. */
            .cg-header .cg-nav {
                display: none !important;
            }

            /* Desktop search belongs only to desktop. */
            .cg-header .cg-search-form-desktop {
                display: none !important;
            }

            /* Make sure the hamburger remains available on mobile. */
            .cg-header .cg-mobile-toggle {
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
            }

            /* Keep the compact mobile header from inheriting desktop spacing. */
            .cg-header .cg-header-inner {
                gap: 12px;
                padding-left: 12px;
                padding-right: 12px;
            }
        }

        @media (min-width: 1101px) {

            /* Mobile-only controls must never appear in the desktop header. */
            .cg-header .cg-mobile-toggle,
            .cg-header .cg-mobile-search-form,
            .cg-header .cg-mobile-menu {
                display: none !important;
            }
        }
