/* --- PLUGIN OVERRIDES: STACKABLE & BLOCKSY --- */

/* Stackable: Align Time */
.align-time .stk-block-content {
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Stackable: Accordion */
.stk-block-accordion .stk-block-accordion__heading .stk-block-icon-label .stk-block-heading {
    flex: initial;
    width: fit-content;
}

.wp-block-stackable-accordion[class*="stk-"] {
    border-color: var(--cmuq-gray-600) !important;
}

details.wp-block-stackable-accordion {
    padding-inline-end: 15px !important;
}

/* Stackable: Carousel */
.wp-block-stackable-carousel.stk--is-slide {
    margin: 0 !important;
}

#home_banner .stk-block-carousel__slider .stk-column {
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* Blocksy: Header & Navigation */
/* --- FIX: SEARCH ICON CLIPPING --- */
.ct-header-search {
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important; /* prevent clipping */
    line-height: 1 !important;
}

.ct-header-search .ct-icon-container,
.ct-header-search .ct-icon {
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    line-height: 1 !important;
}

.ct-header-search .ct-icon-container svg {
    width: 30px !important;
    height: 30px !important;
    display: block !important;
    overflow: visible !important;
}


.ct-header-trigger {
    margin: 0 !important;
}

.ct-toggle-dropdown-mobile .ct-icon,
.ct-toggle-dropdown-mobile .ct-icon-container svg {
    width: 26px;
    height: 26px;
    fill: var(--cmuq-gray-800);
}

.ct-breadcrumbs[data-source="default"] .ct-home-icon {
    stroke: currentColor;
    stroke-width: 0.8px;
    fill: transparent !important;
}


/* --- FIX: FORCE ALL OFFCANVAS LINKS & TEXT TO WHITE --- */
#offcanvas .mobile-menu a,
#offcanvas .mobile-menu li,
#offcanvas .mobile-menu span,
#offcanvas .ct-panel-content,
#offcanvas .ct-panel-content i,
#offcanvas .ct-panel-content svg {
    color: var(--cmuq-white) !important;
    fill: var(--cmuq-white) !important;
}

/* Ensure hover states don't turn them back to black */
#offcanvas .mobile-menu a:hover {
    color: var(--cmuq-red) !important; /* Or whatever your preferred hover color is */
}


/* --- COMPONENT: OFFCANVAS HEADER & CLOSE BUTTON --- */

/* 1. Ensure the header container isn't clipped by the grid */
#offcanvas .ct-panel-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* 2. Position the Close Button with proper clearance */
#offcanvas .ct-panel-actions {
    padding: 25px 25px 0 0 !important; /* Adds 25px gap from top and right */
    display: flex !important;
    justify-content: flex-end !important;
    z-index: 999 !important;
}

/* 3. Reset the button itself to ensure it's fully visible */
#offcanvas .ct-panel-close {
    background: transparent !important;
    color: var(--cmuq-white) !important;
    width: 44px !important;  /* Standard touch target size */
    height: 44px !important;
    opacity: 1 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important; /* Prevents the "clipping" of the bottom */
}

/* 4. Ensure the SVG icon inside the button isn't cut off */
#offcanvas .ct-panel-close svg {
    width: 24px !important;
    height: 24px !important;
    fill: currentColor !important;
}



/* --- NEW MEGA MENU OVERRIDES START HERE --- */



/* --- MOBILE HEADER & SEARCH --- */

[data-header*="type-1"] #search-modal {
    background-color: var(--cmuq-black) !important;
}

[data-header*="type-1"] [data-id="mobile-menu"] {
    order: 3;
    margin-block-start: 35px !important;
    width: 75%;
}

.ct-header .ct-search-box {
    order: 3;
    max-width: 100% !important;
    margin-block-start: 35px !important;
}

.ct-header .ct-search-box form {
    border-block-end: 1px solid #454545 !important;
}



/* --- LOGO & STICKY STATES --- */

.ct-header .site-logo-container {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
}

[data-header*="type-1"] .ct-header [data-id="logo"] .site-logo-container {
    height: auto !important;
    transition: all 0.4s ease-in-out;
}

/* Navigation Colors based on Page ID & Sticky State */
:is(.home, .page-id-176, .page-id-32357, .page-id-178, .page-id-105112, .page-id-2658):not([data-header*="sticky:shrink"]) 
:is(nav[class*="menu"] .ct-menu-link, .ct-header [data-id="menu"]>ul>li>a) {
    color: var(--cmuq-white);
}

/* Sticky Icon Colors */
body:is(.home, .page-id-176, .page-id-32357, .page-id-178, .page-id-105112, .page-id-2658)[data-header="type-1:sticky"] 
.ct-header-socials .ct-icon-container path {
    fill: var(--cmuq-white) !important;
}



/* --- MEGAMENU & SEARCH BOX --- */

#menu-megamenu-1 > li {
    width: 33.33%;
    border-inline-start: 1px solid color-mix(in srgb, #aea58c, transparent 70%);
    padding-inline: 15px;
}

.ct-header .ct-search-box input {
    color: var(--cmuq-white) !important;
    padding-inline-start: 0;
    border: none;
    height: 44px !important;
}
