/*
 Theme Name:   Astra MFSA Child Clean
 Description:  Astra Child Theme for MFSA
 Version:      8.1.21
 Author:       Syed Kazmi
 Template:     astra
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* =========================================================
   1. GLOBAL VARIABLES
   ========================================================= */
:root {
  --mfsa-brand-teal: #187A71; 
  --mfsa-border:     #808d8d;
  --mfsa-cat-text: #ffffff;
  --securities:             #514689; 
  --real-estate:            #C04427; 
  --firb:                   #4d7a33; 
  --financial-institutions: #4d7a33; 
  --scam-alert:             #D32F2F; 
  --reports:                #C04427; 
  --news-release:           #00685e; 
  --report_annualreports:   #808d8d; 
  --default-pill:           #187A71; 
}

body, h1, h2, h3, .mfsa-switcher-template, .mfsa-filter-btn { font-family: 'Poppins', sans-serif !important; }
html, body { max-width: 100%; overflow-x: hidden; }

/* =========================================================
   2. GLOBAL LAYOUT
   ========================================================= */
#content .ast-container { max-width: 1240px; margin: 0 auto; padding: 20px 20px !important; width: 100%; box-sizing: border-box; }
#main { margin-bottom: 90px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 30px 0; }
.entry-content th { background-color: var(--mfsa-brand-teal) !important; color: #ffffff !important; font-weight: 600; text-align: left; padding: 15px; font-size: 14px; text-transform: uppercase;}
.entry-content tr:nth-child(even) { background-color: #f2f7f6 !important; }
.entry-content td { padding: 12px 15px; border: 1px solid var(--mfsa-border); }

/* Normal-mode form guidance must remain readable on white fields. */
input::placeholder,
textarea::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
}

.description,
.field-description,
.form-text,
.help-text,
.mfsa-instruction,
.mfsa-help-text {
  color: #4b5563;
}

/* Search actions share the same minimum target height as their fields. */
form[role="search"] button,
.search-form .search-submit,
.mfsa-manual-search-form button,
.mfsa-search-form button {
  min-height: 44px;
  min-width: 44px;
}
		
		

/* =========================================================
   3. HEADER & NAVIGATION
   ========================================================= */
.ast-primary-header-bar, .site-primary-header-wrap, #ast-desktop-header, #ast-mobile-header, .ast-header-break-point .site-header {
    background-color: #ffffff !important; z-index: 999999 !important; position: relative !important; box-shadow: none !important; border-bottom: none !important; 
}

/* WIDE HEADER (Unifies all pages) */
.site-header .ast-container, .ast-main-header-bar-alignment {
    display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important;
    width: 100% !important; max-width: 100% !important; margin: 0 auto !important; padding-left: 50px !important; padding-right: 50px !important;
    box-sizing: border-box !important; flex-wrap: nowrap !important;
}

@media (max-width: 921px) {
    .site-header .ast-container, .ast-main-header-bar-alignment { padding-left: 20px !important; padding-right: 20px !important; }
}

.ast-builder-grid-row { width: 100% !important; display: flex !important; justify-content: space-between !important; align-items: center !important; flex-wrap: nowrap !important; }
.site-header-section-left { margin-right: auto !important; margin-left: 0 !important; }
.site-header-section-right { margin-left: auto !important; margin-right: 0 !important; }

#ast-hf-menu-1 .menu-item > a:before, #ast-hf-menu-1 .menu-item > a:after,
#ast-hf-menu-2 .menu-item > a:before, #ast-hf-menu-2 .menu-item > a:after { display: none !important; content: none !important; }
.ast-header-navigation-arrow svg, .dropdown-menu-toggle svg { fill: currentColor !important; width: 0.6em !important; }

/* Astra's submenu arrow is a separate keyboard control. Keep keyboard-open
   menus visible without changing the existing hover or mobile behaviour. */
#masthead .menu-item-has-children.mfsa-submenu-keyboard-open > .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#masthead .dropdown-menu-toggle[role="button"]:focus-visible,
#masthead .ast-menu-toggle:focus-visible {
    outline: 3px solid #1a5276 !important;
    outline-offset: 3px !important;
    border-radius: 2px;
}

/* LOGO BASE */
.site-branding { display: flex !important; align-items: center !important; text-align: left !important; padding: 12px 0; }
.site-branding .site-title a { font-family: 'Poppins', sans-serif !important; font-weight: 700 !important; font-size: 20px !important; line-height: 1.1 !important; color: #00685e !important; text-decoration: none !important; text-transform: none !important; display: inline-block !important; max-width: 210px !important; white-space: normal !important; vertical-align: middle !important; margin-left: 15px; }

/* French agency name.
   TranslatePress normally changes the html lang value/body class. The :has()
   selector is a fallback for this site's checked French language toggle. */
@media (min-width: 1401px) {
    html[lang^="fr"] .site-branding .site-title a,
    html[class*="translatepress-fr"] .site-branding .site-title a,
    body[class*="translatepress-fr"] .site-branding .site-title a,
    body:has(.mfsa-lang-widget .lang-toggle input:checked) .site-branding .site-title a {
        font-size: 0 !important;
        line-height: 0 !important;
    }

    html[lang^="fr"] .site-branding .site-title a::after,
    html[class*="translatepress-fr"] .site-branding .site-title a::after,
    body[class*="translatepress-fr"] .site-branding .site-title a::after,
    body:has(.mfsa-lang-widget .lang-toggle input:checked) .site-branding .site-title a::after {
        content: "Office des services financiers du Manitoba" !important;
        display: inline-block !important;
        max-width: 250px !important;
        white-space: normal !important;
        font-size: 20px !important;
        line-height: 1.1 !important;
        font-weight: 700 !important;
        color: #00685e !important;
    }
}

/* DESKTOP MENUS (Primary & Secondary Logic) */
@media (min-width: 922px) {
    #ast-desktop-header { display: block !important; } 
    #ast-mobile-header { display: none !important; }
    
    /* Force horizontal Flexbox alignment */
    #ast-hf-menu-1, #ast-hf-menu-2 { flex-wrap: nowrap !important; align-items: center !important; }
    #ast-hf-menu-1 > .menu-item, #ast-hf-menu-2 > .menu-item { flex-shrink: 0 !important; white-space: nowrap !important; }
    
    #ast-hf-menu-1 .menu-item > a, #ast-hf-menu-2 .menu-item > a { color: #1d3345 !important; font-weight: 700 !important; padding: 0 14px !important; text-decoration: none !important; font-size: 16px !important; white-space: nowrap !important; }
    #ast-hf-menu-1 .menu-item:hover > a, #ast-hf-menu-1 .current-menu-item > a, #ast-hf-menu-2 .menu-item:hover > a, #ast-hf-menu-2 .current-menu-item > a { color: #00685e !important; }
    
    /* Dropdowns */
    .ast-builder-menu-1 .main-header-menu > .menu-item > .sub-menu, .ast-builder-menu-2 .main-header-menu > .menu-item > .sub-menu { left: auto !important; right: 0 !important; margin-top: 0 !important; top: 100% !important; padding: 0 !important; z-index: 999999 !important; position: absolute !important; }
    .ast-builder-menu-1 .main-header-menu .sub-menu .menu-item .sub-menu, .ast-builder-menu-2 .main-header-menu .sub-menu .menu-item .sub-menu { left: 100% !important; right: auto !important; top: 0 !important; }
    .ast-builder-menu-1 .main-header-menu > .menu-item:nth-last-child(-n+3) .sub-menu .menu-item > .sub-menu { left: auto !important; right: 100% !important; }
    
    #ast-hf-menu-1 .sub-menu, #ast-hf-menu-2 .sub-menu { background-color: #ffffff !important; border-top: 4px solid #00685e !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; min-width: 250px !important; padding: 10px 0 0 0 !important; }
    #ast-hf-menu-1 .sub-menu .menu-item a, #ast-hf-menu-2 .sub-menu .menu-item a { padding: 14px 25px !important; text-align: left !important; color: #333 !important; font-weight: 500 !important; font-size: 16px !important; border-bottom: 1px solid #f4f4f4; display: flex !important; justify-content: space-between !important; align-items: center !important;
	white-space: normal !important;
	word-break: break-word !important;}
    #ast-hf-menu-1 .sub-menu .menu-item:hover, #ast-hf-menu-2 .sub-menu .menu-item:hover { background-color: #f9fafb !important; }
    #ast-hf-menu-1 .sub-menu .menu-item:hover > a, #ast-hf-menu-2 .sub-menu .menu-item:hover > a { color: #00685e !important; padding-left: 30px !important; }
    #ast-hf-menu-1 .sub-menu .menu-item:last-child > a, #ast-hf-menu-2 .sub-menu .menu-item:last-child > a { border-bottom: none !important; }
    
    /* OVERRIDE ASTRA'S EARLY MOBILE BREAKPOINT ON SECONDARY MENU */
    .ast-builder-menu-2 .main-navigation { display: block !important; }
    .ast-builder-menu-2 .main-header-menu { display: flex !important; flex-direction: row !important; background: transparent !important; border: none !important; padding: 0 !important; margin: 0 !important; }
    .ast-builder-menu-2 .main-header-menu > .menu-item { width: auto !important; border: none !important; background: transparent !important; }
    .ast-builder-menu-2 .ast-menu-toggle { display: none !important; }
}

/* THE MENU SWAP LOGIC */
@media (min-width: 1401px) {
    .ast-builder-menu-1 { display: flex !important; align-items: center !important; }
    .ast-builder-menu-2 { display: none !important; }
}

@media (min-width: 922px) and (max-width: 1400px) {
    .ast-builder-menu-1 { display: none !important; }
    .ast-builder-menu-2 { display: flex !important; align-items: center !important; }
    #ast-hf-menu-2 .menu-item > a { padding: 0 10px !important; font-size: 15px !important; }
    
	.site-branding .site-title a { font-size: 0 !important; line-height: 0 !important; letter-spacing: 0 !important; width: auto !important; min-width: 80px !important; white-space: nowrap !important; display: inline-block !important; }
	.site-branding .site-title a:after { content: "MFSA"; font-size: 24px !important; line-height: 1.2 !important; font-weight: 700 !important; color: #00685e !important; display: inline-block !important; white-space: nowrap !important; }
	html[lang^="fr"] .site-branding .site-title a::after,
	html[class*="translatepress-fr"] .site-branding .site-title a::after,
	body[class*="translatepress-fr"] .site-branding .site-title a::after,
	body:has(.mfsa-lang-widget .lang-toggle input:checked) .site-branding .site-title a::after { content: "OSFM" !important; }
}

/* =========================================================
   MOBILE MENU & HAMBURGER (Added "MENU" Text)
   ========================================================= */
@media (max-width: 921px) {
    .ast-builder-menu-1, .ast-builder-menu-2 { display: none !important; }
    #ast-desktop-header { display: none !important; } 
    #ast-mobile-header { display: block !important; visibility: visible !important; }
    
	.site-branding .site-title a { position: relative !important; display: block !important; width: 60px !important; overflow: hidden !important; text-indent: -9999px !important; white-space: nowrap !important; max-width: none !important; margin-left: 0 !important; }
	.site-branding .site-title a:after { content: "MFSA"; position: absolute !important; left: 0 !important; top: 0 !important; text-indent: 0 !important; font-size: 20px !important; font-weight: 700 !important; color: #00685e !important; visibility: visible !important; display: block !important; }
	html[lang^="fr"] .site-branding .site-title a::after,
	html[class*="translatepress-fr"] .site-branding .site-title a::after,
	body[class*="translatepress-fr"] .site-branding .site-title a::after,
	body:has(.mfsa-lang-widget .lang-toggle input:checked) .site-branding .site-title a::after { content: "OSFM" !important; }
    
    /* Robust targeting for the hamburger toggle */
    #ast-mobile-header .menu-toggle,
    .ast-button-wrap .menu-toggle,
    .ast-mobile-menu-trigger-minimal { 
        display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important;
        visibility: visible !important; color: #00685e !important; background: transparent !important; border: none !important; 
        row-gap: 4px !important; padding: 5px !important; margin-top: 0 !important;
    }
    
    #ast-mobile-header .menu-toggle .mobile-menu-wrap { display: none !important; }
    
    #ast-mobile-header .menu-toggle::after,
    .ast-mobile-menu-trigger-minimal::after {
        content: "MENU" !important; font-size: 11px !important; font-weight: 700 !important; color: #00685e !important; line-height: 1 !important; letter-spacing: 0.5px !important; display: block !important; text-transform: uppercase !important;
    }

    .ast-builder-menu-mobile .main-navigation .main-header-menu .sub-menu { display: none; background-color: #f9fbfc !important; border-top: 2px solid #00685e !important; padding: 10px 0 !important; }
    .ast-builder-menu-mobile .main-navigation .menu-item.ast-menu-toggle-active > .sub-menu { display: block !important; }
    .ast-builder-menu-mobile .main-navigation .menu-item a { color: #003366 !important; font-weight: 600 !important; padding: 15px 20px !important; }
}

/* =========================================================
   4. HEADER SEARCH ICON (Squarish & Close to Toggle)
   ========================================================= */
.ast-builder-menu-1 .main-header-menu, .ast-builder-menu-2 .main-header-menu, .main-navigation .menu-box { align-items: center !important; }

/* Pull search trigger extremely close to language toggle */
.mfsa-search-item { position: relative !important; display: inline-flex !important; align-items: center !important; height: 100% !important; margin-left: 4px !important; padding-left: 0 !important; flex-shrink: 0 !important; }

/* Hidden by default on Desktop */
.mfsa-search-dropdown { visibility: hidden; font-size: 0; color: transparent; position: absolute; opacity: 0; pointer-events: none; }

/* Search Form */
.mfsa-manual-search-form { visibility: visible !important; font-size: 14px !important; display: flex !important; align-items: center !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; gap: 8px !important; box-sizing: border-box !important; }
.mfsa-manual-search-form p, .mfsa-manual-search-form br { display: none !important; } 

@media (min-width: 922px) {
    .mfsa-search-dropdown { 
        display: none; 
        position: absolute !important; 
        top: 100% !important; 
        right: 0 !important; 
        width: min(360px, calc(100vw - 24px)) !important;
        background: #ffffff !important; 
        padding: 10px !important; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; 
        border-top: 3px solid #00685e !important; 
        border-radius: 4px !important; 
        z-index: 999999 !important; 
        margin-top: 15px !important; 
        height: auto !important;
        min-height: 61px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    .mfsa-search-dropdown.is-open { display: block !important; visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; animation: mfsaFadeIn 0.2s ease-out; }
    
    /* The Squarish Trigger Button */
    .mfsa-search-trigger { 
        background-color: #00685e !important; /* Dark Green */
        color: #ffffff !important; 
        border: 0 !important;
        font: inherit !important;
        width: 36px !important; 
        height: 30px !important; 
        border-radius: 6px !important; 
        padding: 0 !important; 
        cursor: pointer !important; 
        text-decoration: none !important; 
        display: flex !important; 
        align-items: center !important; 
        justify-content: center !important; 
        transition: 0.2s ease !important;
    }
    .mfsa-search-trigger:hover { opacity: 0.85 !important; }
    .mfsa-search-trigger:focus-visible { outline: 3px solid #b45309 !important; outline-offset: 3px !important; }
    .mfsa-search-trigger .dashicons { font-size: 16px !important; color: #ffffff !important; margin: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; }
}

/* Mobile Search Overrides */
@media (max-width: 921px) {
    .mfsa-search-item { display: block !important; margin: 0 !important; width: 100% !important; border-top: 1px solid #eee; padding: 15px 20px !important; height: auto !important; }
    .mfsa-search-trigger { display: none !important; }
    
    .mfsa-search-dropdown { 
        display: block !important; 
        position: static !important; 
        width: 100% !important; 
        height: auto !important; 
        overflow: visible !important;
        box-shadow: none !important; 
        border: none !important; 
        padding: 0 !important; 
        background: transparent !important; 
        margin-top: 0 !important; 
        visibility: visible !important; 
        opacity: 1 !important; 
        pointer-events: auto !important; 
    }
}

.mfsa-search-input { flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; max-width: 100% !important; padding: 0 15px !important; border: 1px solid #ddd !important; border-radius: 4px !important; font-size: 14px !important; height: 38px !important; outline: none !important; box-shadow: none !important; margin: 0 !important; color: #333 !important; box-sizing: border-box !important; }
.mfsa-search-btn { flex: 0 0 46px !important; width: 46px !important; max-width: 46px !important; background-color: #00685e !important; color: #ffffff !important; border: none !important; padding: 0 !important; border-radius: 4px !important; cursor: pointer !important; height: 38px !important; display: flex !important; align-items: center !important; justify-content: center !important; min-width: 46px !important; margin: 0 !important; transition: filter 0.2s ease; box-sizing: border-box !important; }
.mfsa-search-btn:hover { filter: brightness(90%); }

/* =========================================================
   5. HYDRO-STYLE BANNER (Image perfectly to the right)
   ========================================================= */
.mfsa-general-banner { position: relative; background-color: var(--mfsa-brand-teal); background: linear-gradient(180deg, var(--mfsa-brand-teal) 0%, #13534d 100%); color: #ffffff; overflow: hidden; margin-bottom: 40px; display: flex; align-items: center; min-height: 280px; }
.mfsa-general-banner .mfsa-banner-inner { width: 100%; max-width: 1240px !important; margin: 0 auto !important; padding: 0 20px; box-sizing: border-box !important; position: static !important; display: flex; align-items: center; min-height: 280px; }
.mfsa-general-banner .mfsa-banner-content { flex: 0 0 55%; padding: 40px 0; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.mfsa-general-banner .breadcrumbs, .mfsa-general-banner .breadcrumbs a, .mfsa-general-banner .breadcrumbs span { color: rgba(255,255,255,0.95) !important; font-size: 14px !important; font-weight: 500 !important; text-decoration: none; }
.mfsa-general-banner .mfsa-banner-crumbs { margin-bottom: 15px; }
.mfsa-general-banner .mfsa-banner-title { color: #ffffff; font-size: 3rem; font-weight: 800; line-height: 1.1; margin: 0 0 15px 0; }
.mfsa-general-banner .mfsa-banner-desc { color: rgba(255,255,255,0.95); font-size: 16px; line-height: 1.5; max-width: 600px; }

/* Banner image securely absolute to the right edge */
.mfsa-general-banner .mfsa-banner-visual { position: absolute; top: 0; right: 0; bottom: 0; width: 38vw; max-width: 750px; display: none; z-index: 1; }
.mfsa-general-banner.has-image .mfsa-banner-visual { display: block; }
.mfsa-general-banner .mfsa-banner-img-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-size: cover; background-position: center; clip-path: ellipse(150% 150% at 100% 50%); z-index: 2; filter: saturate(0%); opacity: .9; }

/* Remove old grey borders */
.mfsa-general-banner .mfsa-banner-curve, .mfsa-general-banner .mfsa-banner-visual::before { display: none !important; }

@media (max-width: 921px) {
    .mfsa-general-banner { display: block; min-height: auto; }
    .mfsa-general-banner .mfsa-banner-inner { flex-direction: column; padding: 0 20px; }
    .mfsa-general-banner .mfsa-banner-content { padding: 40px 0; }
    .mfsa-general-banner .mfsa-banner-title { font-size: 2.2rem; }
    .mfsa-general-banner .mfsa-banner-visual { position: relative; width: 100%; height: 200px; max-width: none; }
    .mfsa-general-banner .mfsa-banner-img-bg { clip-path: none; }
}

/* =========================================================
   15. HOMEPAGE FOOTER GAP FIX 
   ========================================================= */
.home #content .ast-container, .home .site-content, .home #primary, .home #main, .home .entry-content, .home .entry-content > *:last-child { padding-bottom: 0 !important; margin-bottom: 0 !important; min-height: 0 !important; }
.home .site-footer { margin-top: 0 !important; }

/* =========================================================
   16. HERO BANNER ASPECT RATIO FIX 
   ========================================================= */
.chb-hero-container { background-position: center top !important; background-size: cover !important; background-repeat: no-repeat !important; min-height: 45vw !important; display: flex !important; flex-direction: column !important; justify-content: center !important; padding-top: 80px !important; padding-bottom: 80px !important; }
@media (min-width: 1600px) { .chb-hero-container { min-height: 750px !important; background-position: center 25% !important; } }
@media (max-width: 768px) { .chb-hero-container { min-height: 500px !important; background-position: center center !important; } }

/* =========================================================
   6. INDUSTRY BUTTONS
   ========================================================= */
/*mfsa-nav-container { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px 0; margin-bottom: 40px; }*/
.mfsa-nav-container { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; }

.mfsa-filter-btn { padding: 12px 26px; border-radius: 5px; border: 1px solid var(--mfsa-brand-teal); color: var(--mfsa-brand-teal); background: #ffffff; font-weight: 600; text-decoration: none; transition: all 0.3s ease; cursor: pointer; display: inline-block; }
.mfsa-filter-btn:hover, .mfsa-filter-btn.active, .mfsa-filter-btn.is-active { background-color: var(--mfsa-brand-teal); color: #ffffff !important; }
.theme-securities .mfsa-filter-btn { color: var(--securities) !important; border-color: var(--securities) !important; }
.theme-securities .mfsa-filter-btn:hover, .theme-securities .mfsa-filter-btn.active { background-color: var(--securities) !important; color: #ffffff !important; }
.theme-real-estate .mfsa-filter-btn { color: var(--real-estate) !important; border-color: var(--real-estate) !important; }
.theme-real-estate .mfsa-filter-btn:hover, .theme-real-estate .mfsa-filter-btn.active { background-color: var(--real-estate) !important; color: #ffffff !important; }
.theme-firb .mfsa-filter-btn { color: var(--firb) !important; border-color: var(--firb) !important; }
.theme-firb .mfsa-filter-btn:hover, .theme-firb .mfsa-filter-btn.active { background-color: var(--firb) !important; color: #ffffff !important; }

/* =========================================================
   7. SIDEBAR & ACCORDION
   ========================================================= */
.mfsa-sidebar-item { display: block; padding: 10px 15px; text-decoration: none; color: #1f2937; font-size: 16px; line-height: 1.45; border-left: 4px solid transparent; transition: color 0.2s ease, background-color 0.2s ease; }
.mfsa-sidebar-item:hover { color: #000; text-decoration: underline; }
.mfsa-sidebar-item.is-current { background-color: transparent !important; border: none !important; padding-left: 15px !important; font-weight: 700 !important; }
.mfsa-switcher-template .wp-block-accordion { border: none !important; gap: 25px; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
.mfsa-switcher-template .wp-block-accordion-item { background-color: #ffffff; border: 1px solid #e5e7eb; border-left-width: 6px !important; border-left-style: solid !important; border-left-color: var(--mfsa-brand-teal) !important; border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.04); margin-bottom: 20px !important; width: 100% !important; box-sizing: border-box !important; display: block !important; }
.mfsa-switcher-template .wp-block-accordion-heading__toggle { background: transparent !important; padding: 20px 26px !important; width: 100% !important; min-height: 48px; box-sizing: border-box !important; cursor: pointer; text-decoration: none !important; }
.mfsa-switcher-template .wp-block-accordion-heading__toggle-title { font-size: 20px !important; font-weight: 700 !important; color: #1e293b !important; }
.mfsa-switcher-template .wp-block-accordion-heading__toggle-icon { order: 2 !important; font-size: 24px !important; font-weight: 400; flex-shrink: 0; color: var(--mfsa-brand-teal) !important; }
.mfsa-switcher-template .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle-icon { transform: rotate(45deg) !important; }
.mfsa-switcher-template .wp-block-accordion-panel { padding: 8px 26px 26px !important; border-top: 0 solid #f1f5f9; color: #555; font-size: 16px; width: 100% !important; box-sizing: border-box !important; }

/* WordPress uses hidden="until-found" for collapsed accordion panels. Keep
   those panels searchable without allowing their padding to create a blank row. */
.mfsa-switcher-template .wp-block-accordion-panel[hidden] {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

.mfsa-switcher-template .wp-block-accordion-panel a { font-weight: 500; text-decoration: underline; color: var(--mfsa-brand-teal); }

.theme-securities .wp-block-accordion-item { border-left-color: var(--securities) !important; }
.theme-securities .wp-block-accordion-heading__toggle-icon { color: var(--securities) !important; }
.theme-securities .wp-block-accordion-panel a { color: var(--securities); }
.theme-real-estate .wp-block-accordion-item { border-left-color: var(--real-estate) !important; }
.theme-real-estate .wp-block-accordion-heading__toggle-icon { color: var(--real-estate) !important; }
.theme-real-estate .wp-block-accordion-panel a { color: var(--real-estate); }
.theme-firb .wp-block-accordion-item { border-left-color: var(--firb) !important; }
.theme-firb .wp-block-accordion-heading__toggle-icon { color: var(--firb) !important; }
.theme-firb .wp-block-accordion-panel a { color: var(--firb); }

/* =========================================================
   8. LAYOUT & RESPONSIVE
   ========================================================= */
.mfsa-switcher-container { display: flex; gap: 60px; margin-top: 20px; }
.mfsa-sidebar-col { flex: 0 0 290px; background: #f8f9fa; border-radius: 8px; border: 1px solid #e5e7eb; height: fit-content; padding: 22px; box-sizing: border-box; }
.mfsa-content-col { flex: 1; min-width: 0; }
.mfsa-switcher-template .mfsa-content-col .entry-content > * { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; box-sizing: border-box !important; }

@media (max-width: 921px) {
    .mfsa-switcher-container { flex-direction: column; gap: 30px; }
    .mfsa-sidebar-col { flex: 0 0 100%; width: 100%; border-right: none; }
    .mfsa-nav-container { justify-content: center; }
    .mfsa-switcher-template .wp-block-accordion-heading__toggle { padding: 16px 18px !important; }
    .mfsa-switcher-template .wp-block-accordion-panel { padding: 6px 18px 20px !important; }
    .mfsa-switcher-template .wp-block-accordion-panel[hidden] { padding: 0 !important; }
}
.mfsa-parent-title { margin: 0 0 20px; font-size: 2em; color: #222; font-weight: 700; }
.mfsa-child-title { margin: 0 0 35px; font-size: 1.5em; color: #1e293b; font-weight: 700; }

/* =========================================================
   9. MEDIA CENTER
   ========================================================= */
.mfsa-mc-wrapper { width: 100% !important; max-width: 1200px; margin: 0 auto; font-family: 'Poppins', sans-serif; padding: 20px 0; }
.mfsa-mc-filters { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; align-items: center; }
.mfsa-select { padding: 10px 15px; border: 1px solid #ddd; border-radius: 4px; background: #fff; min-width: 200px; font-size: 15px; color: #333; }
.mfsa-mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; width: 100%; }
.mfsa-mc-card { background: #fff; border: 1px solid #e1e4e8; border-radius: 8px; padding: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); display: flex; flex-direction: column; text-decoration: none; }
.mfsa-mc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.08); }
.mfsa-mc-date { font-size: 13px; color: #64748b; margin-bottom: 10px; display: block; font-weight: 500; }
.mfsa-mc-title { font-size: 18px; font-weight: 700; color: #00685e; text-decoration: none; line-height: 1.4; margin-bottom: 12px; display: block; }
.mfsa-mc-excerpt { font-size: 15px; color: #475569; line-height: 1.6; }

/* =========================================================
   10. HEARINGS TABLES
   ========================================================= */
.mfsa-hearings-all { margin: 18px 0 40px; }
.mfsa-hearings-tabs { display:flex; align-items:center; gap:12px; font-size: 18px; font-weight: 600; margin: 6px 0 18px; }
.mfsa-hearings-tab { background: transparent; border: 0; padding: 0; cursor: pointer; color: #00685e; font: inherit; text-decoration: none; }
.mfsa-hearings-tab.is-active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.mfsa-hearings-sep { color:#94a3b8; }
.mfsa-hearings-pane { display:none; }
.mfsa-hearings-pane.is-active { display:block; }
.mfsa-hearings-table-wrap { overflow-x:auto; border:1px solid #e2e8f0; border-radius: 8px; background:#fff; }
.mfsa-hearings-table { width:100%; border-collapse: collapse; min-width: 760px; }
.mfsa-hearings-table thead th { background: #0b6b5f; color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; padding: 16px 16px; text-align: left; cursor: pointer; }
.mfsa-hearings-table tbody td { padding: 18px 16px; border-top: 1px solid #eef2f7; vertical-align: top; font-size: 16px; color: #0f172a; }
.mfsa-matter-link { color:#00685e; text-decoration: underline; text-underline-offset: 3px; }
.mfsa-acts-ul { margin:0; padding-left: 18px; }

/* =========================================================
   11. UNIFIED SEARCH & ARCHIVE GRID Styling
   ========================================================= */
body.search .ast-row, body.archive .ast-row { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; gap: 30px !important; margin: 40px 0 60px 0 !important; flex-wrap: wrap !important; justify-content: center !important; }
body.search .ast-row > *, body.archive .ast-row > * { width: 100% !important; max-width: 100% !important; min-width: 0 !important; flex: none !important; padding: 0 !important; margin: 0 !important; }
body.search article, body.archive article { background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); display: flex; flex-direction: column; height: 100%; box-sizing: border-box; transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; }
body.search article:hover, body.archive article:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.08); border-color: var(--mfsa-brand-teal); }
body.search article .entry-header, body.archive article .entry-header { display: flex !important; flex-direction: column !important; }
body.search article .ast-taxonomy-container, body.archive article .ast-taxonomy-container { order: 1 !important; margin-bottom: 12px !important; }
body.search article .entry-meta, body.archive article .entry-meta { order: 2 !important; margin-bottom: 8px !important; }
body.search article .entry-title, body.archive article .entry-title { order: 3 !important; margin-bottom: 10px !important; }
body.search .ast-blog-single-element.ast-taxonomy-container, body.archive .ast-blog-single-element.ast-taxonomy-container { color: transparent !important; font-size: 0 !important; display: block !important; }
body.search .ast-taxonomy-container a, body.archive .ast-taxonomy-container a { display: inline-block !important; padding: 4px 8px !important; line-height: 1.2 !important; font-size: 11px !important; font-weight: 700 !important; border-radius: 4px !important; text-transform: uppercase !important; text-decoration: none !important; text-align: center !important; box-sizing: border-box !important; margin: 0 6px 0 0 !important; height: auto !important; transition: opacity 0.2s ease !important; background-color: var(--pill-color, #00685e) !important; color: #ffffff !important; border: none !important; vertical-align: top !important; letter-spacing: 0 !important; }
body.search .ast-taxonomy-container a:hover, body.archive .ast-taxonomy-container a:hover { opacity: 0.85 !important; }

article { --pill-color: var(--default-pill); }
article.category-securities, article.type-securities, article.securities { --pill-color: var(--securities); }
article.category-real-estate, article.type-real-estate, article.real-estate { --pill-color: var(--real-estate); }
article.category-firb, article.type-firb, article.firb { --pill-color: var(--firb); }
article.category-financial-institutions, article.financial-institutions { --pill-color: var(--financial-institutions); }
article.category-scam-alert, article.scam-alert, article.category-alerts { --pill-color: var(--scam-alert); }
article.category-reports, article.reports { --pill-color: var(--reports); }
article.category-news, article.news-release { --pill-color: var(--news-release); }

body.search .ast-taxonomy-container a[href*="/securities/"], body.archive .ast-taxonomy-container a[href*="/securities/"], body.search .ast-taxonomy-container a[href*="/financial-institutions/"], body.archive .ast-taxonomy-container a[href*="/financial-institutions/"], body.search .ast-taxonomy-container a[href*="/real-estate/"], body.archive .ast-taxonomy-container a[href*="/real-estate/"] { width: 24px !important; padding: 4px 0 !important; font-size: 0 !important; color: transparent !important; }
body.search .ast-taxonomy-container a[href*="/securities/"]::after, body.archive .ast-taxonomy-container a[href*="/securities/"]::after { content: "S"; font-size: 13px !important; color: #ffffff !important; }
body.search .ast-taxonomy-container a[href*="/financial-institutions/"]::after, body.archive .ast-taxonomy-container a[href*="/financial-institutions/"]::after { content: "F"; font-size: 13px !important; color: #ffffff !important; }
body.search .ast-taxonomy-container a[href*="/real-estate/"]::after, body.archive .ast-taxonomy-container a[href*="/real-estate/"]::after { content: "R"; font-size: 13px !important; color: #ffffff !important; }
body.search .entry-title a, body.archive .entry-title a { color: #111827; font-family: 'Poppins', sans-serif; font-size: 1.25rem; font-weight: 700; line-height: 1.35; text-decoration: none; }
body.search .entry-title a:hover, body.archive .entry-title a:hover { color: var(--mfsa-brand-teal); }
body.search .entry-content p, body.archive .entry-content p { color: #475569; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px;}
body.search .entry-meta .ast-icon, body.archive .entry-meta .ast-icon { display: none; }
body.search .entry-meta, body.archive .entry-meta { font-size: 0 !important; }
body.search .entry-meta .posted-by, body.archive .entry-meta .posted-by { display: none !important; }
body.search .entry-meta .posted-on, body.archive .entry-meta .posted-on { font-size: 0.85rem !important; color: #64748b !important; display: inline-block; font-weight: 500; }
body.search .entry-meta .posted-on a, body.archive .entry-meta .posted-on a { text-decoration: none !important; box-shadow: none !important; border: none !important; color: inherit !important; pointer-events: none; }

/* =========================================================
   12. PAGINATION STYLING
   ========================================================= */
.ast-pagination .page-numbers { border-radius: 5px; display: inline-flex; justify-content: center; align-items: center; height: 44px; min-width: 44px; padding: 0 10px; font-weight: 600; font-size: 16px; border: 1px solid #ddd; background: #fff; color: #333; transition: all 0.3s ease; margin: 0 4px; text-decoration: none; line-height: 1; }
.ast-pagination .page-numbers.current, .ast-pagination .page-numbers:hover, .ast-pagination .page-numbers:focus { background-color: var(--mfsa-brand-teal); color: #ffffff; border-color: var(--mfsa-brand-teal); }
.ast-pagination .next.page-numbers, .ast-pagination .prev.page-numbers { font-weight: 700; font-size: 18px; }

/* =========================================================
   13. SINGLE POST CLEANUP 
   ========================================================= */
.single-post #primary .ast-breadcrumbs-wrapper, .single-post #primary .breadcrumbs, .single-post .entry-header .ast-breadcrumbs-wrapper, .single-post .ast-single-post-order > .ast-breadcrumbs-wrapper { display: none !important; visibility: hidden !important; height: 0 !important; margin: 0 !important; padding: 0 !important; }
.single-post .entry-header .entry-meta, .single-post .entry-content .entry-meta, .single-post .read-more-wrap, .single-post .byline, .single-post .posted-on { display: none !important; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding-top: 20px; border-top: 1px solid #eee; }
.post-navigation .nav-links a { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 30px; background-color: var(--mfsa-brand-teal); color: #ffffff !important; border-radius: 5px; font-weight: 700; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-size: 0 !important; }
.post-navigation .nav-links a > * { display: none !important; }
.post-navigation .nav-links a:hover { background-color: #005a50; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.post-navigation .nav-previous a::before { content: "← PREVIOUS"; font-size: 14px; letter-spacing: 1px; }
.post-navigation .nav-next a::after { content: "NEXT →"; font-size: 14px; letter-spacing: 1px; }

/* =========================================================
   16. DETAILS BLOCK STYLING 
   ========================================================= */
.wp-block-details { background-color: #ffffff; border-left: 6px solid #187A71; border-top: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; border-radius: 0 8px 8px 0; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04); margin-bottom: 20px; transition: all 0.3s ease; padding: 0 !important; }
.wp-block-details:hover { box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08); }
.wp-block-details summary { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px !important; font-weight: 700; font-size: 20px; color: #1e293b; cursor: pointer; outline: none; list-style: none; margin-bottom: 0 !important; }
.wp-block-details summary:hover { background-color: #f8fafc; }
.wp-block-details summary::-webkit-details-marker, .wp-block-details summary::marker { display: none; }
.wp-block-details summary::after { font-family: 'Dashicons'; content: '\f347'; color: #187A71; font-size: 24px; font-weight: 400; transition: transform 0.3s ease; margin-left: 15px; }
.wp-block-details[open] summary::after { transform: rotate(180deg); }
.wp-block-details[open] summary { border-bottom: 1px solid #f1f5f9; }
.wp-block-details > *:not(summary) { margin-left: 30px !important; margin-right: 30px !important; color: #475569; font-size: 16px; line-height: 1.6; max-width: calc(100% - 60px); }
.wp-block-details > *:not(summary):first-of-type { margin-top: 20px !important; }
.wp-block-details > *:not(summary):last-child { margin-bottom: 30px !important; }

/* =========================================================
   17. SIDEBAR HIERARCHY & NESTING
   ========================================================= */
.mfsa-sidebar-col .mfsa-sidebar-item { position: relative; color: #1f2937; font-size: 17px; font-weight: 500; line-height: 1.45; transition: color 0.2s ease, background-color 0.2s ease; }
.mfsa-nested-group.depth-0 > .mfsa-sidebar-item { padding-left: 15px !important; font-size: 17px; font-weight: 700; color: #111827; }
.mfsa-nested-group.depth-1 > .mfsa-sidebar-item { padding-left: 33px !important; font-size: 17px; color: #1f2937; }
.mfsa-nested-group.depth-2 > .mfsa-sidebar-item { padding-left: 51px !important; font-size: 16px; color: #334155; }
.mfsa-nested-group.depth-3 > .mfsa-sidebar-item, .mfsa-nested-group.depth-4 > .mfsa-sidebar-item { padding-left: 69px !important; font-size: 16px; color: #334155; }
.mfsa-nested-group.depth-1 > .mfsa-sidebar-item::before { content: ""; position: absolute; left: 19px; top: 50%; transform: translateY(-50%); width: 7px; height: 2px; background-color: #64748b; }
.mfsa-nested-group.depth-2 > .mfsa-sidebar-item::before { content: ""; position: absolute; left: 37px; top: 50%; transform: translateY(-50%); width: 7px; height: 2px; background-color: #64748b; }
.mfsa-nested-group.depth-3 > .mfsa-sidebar-item::before, .mfsa-nested-group.depth-4 > .mfsa-sidebar-item::before { content: ""; position: absolute; left: 55px; top: 50%; transform: translateY(-50%); width: 7px; height: 2px; background-color: #64748b; }
.mfsa-sidebar-col .mfsa-sidebar-item.is-current { color: #000 !important; }
.mfsa-sidebar-col .mfsa-sidebar-item.is-active-path { color: #111827; font-weight: 700; }

/* =========================================================
   18. MOBILE OVERRIDES: Top Buttons & Symmetrical Sidebar
   ========================================================= */
@media (max-width: 921px) {
    .mfsa-nav-container { display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important; width: 100%; padding: 15px 0 !important; }
    .mfsa-filter-btn { width: 100% !important; text-align: center !important; box-sizing: border-box !important; margin: 0 !important; display: flex !important; justify-content: center !important; align-items: center !important; }
    .mfsa-sidebar-col { text-align: center !important; padding: 20px 15px !important; }
    .mfsa-sidebar-col .mfsa-sidebar-item { text-align: center !important; padding: 12px 15px !important; border-left: none !important; border-bottom: 1px solid #eaeaea; width: 100%; box-sizing: border-box; display: block !important; }
    .mfsa-nested-group .mfsa-sidebar-item::before { display: none !important; }
    .mfsa-sidebar-col .mfsa-sidebar-item.is-current { background-color: var(--mfsa-brand-teal) !important; color: #ffffff !important; border-radius: 6px; border-bottom: none !important; font-weight: 600 !important; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .mfsa-nested-group .mfsa-sidebar-item:last-child { border-bottom: none !important; }
}

/* =========================================================
   19. Language Toggle Button (Matched Color & Alignment)
   ========================================================= */
.mfsa-lang-widget {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important; 
  margin: 0 auto;
}

/* Base Desktop Size */
.mfsa-lang-widget .lang-toggle {
  position: relative;
  display: inline-block;
  width: 60px !important;  
  height: 30px !important; 
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  box-sizing: border-box !important;
  border: none !important;
}

.mfsa-lang-widget .lang-toggle input { 
  opacity: 0 !important; width: 0 !important; height: 0 !important; margin: 0 !important; position: absolute !important; 
}

/* Background Track (Dark Green matching Search Button) */
.mfsa-lang-widget .lang-slider,
.mfsa-lang-widget .lang-toggle input:checked + .lang-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #00685e !important; /* MATCHES SEARCH BUTTON */
  transition: 0.3s ease;
  border-radius: 6px !important; 
  box-sizing: border-box !important;
  border: none !important;
}

/* The Sliding Button (Thumb) */
.mfsa-lang-widget .lang-slider:before {
  position: absolute;
  content: "" !important;
  height: 22px !important; 
  width: 22px !important;  
  min-width: 22px !important; 
  min-height: 22px !important; 
  left: 4px !important; 
  top: 4px !important; 
  background-color: #ffffff !important;
  transition: 0.3s ease;
  border-radius: 4px !important; 
  z-index: 2 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
  box-sizing: border-box !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* The Text */
.mfsa-lang-widget .lang-slider:after {
  content: "Fr" !important;
  position: absolute;
  right: 10px !important; 
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #ffffff !important;
  font-size: 13px !important; 
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Toggled State (Desktop) */
.mfsa-lang-widget .lang-toggle input:checked + .lang-slider:before { 
  transform: translateX(30px) !important; 
}
.mfsa-lang-widget .lang-toggle input:checked + .lang-slider:after { 
  content: "En" !important; 
  left: 10px !important; 
  right: auto !important; 
}

/* --- DESKTOP ALIGNMENT --- */
@media (min-width: 922px) {
  .ast-desktop .main-header-menu > .menu-item:has(.mfsa-lang-widget) {
    display: flex !important;
    align-items: center !important;
  }
  
  .mfsa-menu-toggle-wrapper {
    padding-left: 15px !important;
    padding-right: 0 !important; /* Pulls the right side tighter to the search button */
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
  }
}

/* --- MOBILE ALIGNMENT & FIXES --- */
@media (max-width: 921px) {
  
  .ast-header-break-point .ast-search-icon,
  .ast-header-break-point .ast-search-menu-icon {
    display: none !important;
  }
  
  .menu-item:has(.mfsa-lang-widget), .mfsa-menu-toggle-wrapper {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 15px 0 20px 0 !important;
  }
  
  .mfsa-lang-widget .lang-toggle {
    width: 100px !important;
    height: 38px !important;
  }
  
  .mfsa-lang-widget .lang-slider:before {
    height: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }
  
  .mfsa-lang-widget .lang-slider:after {
    font-size: 15px !important;
    right: 22px !important;
  }
  
  .mfsa-lang-widget .lang-toggle input:checked + .lang-slider:before { 
    transform: translateX(62px) !important; 
  }
  
  .mfsa-lang-widget .lang-toggle input:checked + .lang-slider:after { 
    left: 22px !important; 
  }
}

/* =========================================================
   20. HIDE MENU SEARCH BAR ON HOMEPAGE (MOBILE ONLY)
   ========================================================= */
@media (max-width: 921px) {
    body.home .mfsa-search-item,
    body.front-page .mfsa-search-item,
    body.home .ast-header-break-point .mfsa-search-item,
    body.front-page .ast-header-break-point .mfsa-search-item {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    }
}
/* =========================================================
   20. HIDE MENU SEARCH BAR ON HOMEPAGE (High Specificity)
   ========================================================= 
body.home .mfsa-search-item,
body.front-page .mfsa-search-item,
body.home .ast-header-break-point .mfsa-search-item,
body.front-page .ast-header-break-point .mfsa-search-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
}*/

/* =========================================================
   20. HIDE MENU SEARCH BAR ON HOMEPAGE (MOBILE ONLY)
   ========================================================= */
@media (max-width: 921px) {
    body.home .mfsa-search-item,
    body.front-page .mfsa-search-item,
    body.home .ast-header-break-point .mfsa-search-item,
    body.front-page .ast-header-break-point .mfsa-search-item {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    }
}

/* Remove default bottom borders from all table headers */
.entry-content table th,
.entry-content table thead,
.wp-block-table th,
.wp-block-table thead,
.mfsa-hearings-table th,
.mfsa-hearings-table thead {
    border-bottom: none !important;
    border: none !important;
}

/* Ensure the top row of standard table cells doesn't double up a top border */
.entry-content tbody tr:first-child td {
    border-top: none !important;
}



/***********************************************/
/*Dark Sub Menu-  Deep Emerald Green*/
/***********************************************/
/*
#ast-hf-menu-1 .sub-menu, 
#ast-hf-menu-2 .sub-menu {
    background-color: #0b221f !important;
    border-top: 4px solid #00685e !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
    padding: 10px 0 0 0 !important;    
    
    width: max-content !important;    
    min-width: 250px !important;     
  white-space: nowrap !important;
	
}
}*/

/* Forces the dropdown links to turn white */

/*#ast-hf-menu-1 .sub-menu .menu-item a, 
#ast-hf-menu-2 .sub-menu .menu-item a {
    color: #ffffff !important;
} */

/* Subtle brand hover effect */
/*#ast-hf-menu-1 .sub-menu .menu-item a:hover, 
#ast-hf-menu-2 .sub-menu .menu-item a:hover {
    background-color: #12332f !important;
    color: #ffffff !important;
}*/
	
	

/* =========================================================
   RESPONSIVE DESKTOP HEADER — 2026-08-11
   Keeps the French agency name readable without pushing the
   language switcher or search control outside the viewport.
   ========================================================= */
@media (min-width: 1401px) {
    .site-header .ast-container,
    .ast-main-header-bar-alignment {
        padding-left: clamp(24px, 2.6vw, 50px) !important;
        padding-right: clamp(24px, 2.6vw, 50px) !important;
        overflow: visible !important;
    }

    #masthead .ast-builder-grid-row {
        gap: clamp(12px, 1.4vw, 28px) !important;
        min-width: 0 !important;
    }

    #masthead .site-header-section-left {
        flex: 0 0 340px !important;
        width: 340px !important;
        min-width: 340px !important;
        max-width: 340px !important;
    }

    #masthead .site-branding.ast-site-identity {
        display: flex !important;
        flex: 0 0 340px !important;
        width: 340px !important;
        min-width: 340px !important;
        max-width: 340px !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }

    #masthead .site-branding .site-logo-img,
    #masthead .site-branding .custom-logo-link {
        flex: 0 0 72px !important;
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
    }

    #masthead .site-branding .ast-site-title-wrap {
        display: block !important;
        flex: 0 0 253px !important;
        width: 253px !important;
        min-width: 253px !important;
        max-width: 253px !important;
        overflow: visible !important;
    }

    #masthead .site-branding .site-title,
    #masthead .site-branding .site-title a,
    #masthead .site-branding .site-title a::after {
        width: 100% !important;
        max-width: 253px !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        writing-mode: horizontal-tb !important;
        overflow: visible !important;
    }

    #masthead .site-header-section-right {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding-right: 8px !important;
        overflow: visible !important;
    }

    #masthead .site-header-section-right .ast-builder-layout-element,
    #masthead .main-header-menu {
        min-width: 0 !important;
    }

    #masthead #ast-hf-menu-1 .menu-item > a,
    #masthead #ast-hf-menu-2 .menu-item > a {
        padding-left: clamp(7px, 0.65vw, 12px) !important;
        padding-right: clamp(7px, 0.65vw, 12px) !important;
        font-size: clamp(14px, 0.84vw, 16px) !important;
    }

    #masthead .mfsa-menu-toggle-wrapper,
    #masthead .mfsa-search-item {
        flex: 0 0 auto !important;
    }
}

/* French desktop: preserve the full logo and recover space from menu gaps only. */
@media (min-width: 1401px) {
    html[lang^="fr"] #masthead .ast-builder-grid-row,
    html[class*="translatepress-fr"] #masthead .ast-builder-grid-row,
    body[class*="translatepress-fr"] #masthead .ast-builder-grid-row {
        gap: 6px !important;
    }

    html[lang^="fr"] #masthead #ast-hf-menu-1 .menu-item > a,
    html[lang^="fr"] #masthead #ast-hf-menu-2 .menu-item > a,
    html[class*="translatepress-fr"] #masthead #ast-hf-menu-1 .menu-item > a,
    html[class*="translatepress-fr"] #masthead #ast-hf-menu-2 .menu-item > a,
    body[class*="translatepress-fr"] #masthead #ast-hf-menu-1 .menu-item > a,
    body[class*="translatepress-fr"] #masthead #ast-hf-menu-2 .menu-item > a {
        padding-left: 3px !important;
        padding-right: 3px !important;
        font-size: 14px !important;
    }

    html[lang^="fr"] #masthead .site-header-section-right,
    html[class*="translatepress-fr"] #masthead .site-header-section-right,
    body[class*="translatepress-fr"] #masthead .site-header-section-right {
        padding-right: 16px !important;
    }
}
